Jim Chundevalel wrote:

        I'm trying to generate an XSL:FO document on the fly by taking
contents from an XML file. My XML file looks like this.


<DATATEXT> <SECTIONS> <SECTION> <HEADING>Test One</HEADING> <MATTER>This is some text</MATTER> </SECTION> <SECTION> <HEADING>Test Two</HEADING> <MATTER>This is some other text</MATTER> </SECTION> </SECTIONS> </DATATEXT>

I have an XSL FO Document that says

<xsl:for-each select="SECTIONS\SECTION">
        <fo:block>
                <fo:inline text-decoration="underline">
                        <xsl:value-of select="HEADING"/>
                </fo:inline>
                <xsl:value-of select="MATTER"/>
        </fo:block>
</xsl:for-each>

Now, I want to underline certain words contained in the MATTER Node. For
this, I was thinking of doing like this in the XML document.

<MATTER>
This is some <fo:inline text-decoration="underline">other</fo:inline>
text.
</MATTER>


(After referencing the fo namespace at the beginning of the XML
document.)

However, the resulting PDF document does not underline the word "other".
How do I go about doing this?

Having fo in source xml sounds like a really bad idea, but anyway you should use xsl:copy-of, rather than xsl:value-of to copy source subtree.
<xsl:copy-of select="MATTER"/>


--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to