On Jul 2, 2008, at 18:14, knoxor wrote:
I need to be able to parse a block of text that may contain the html
superscript tags and convert this into FOP superscripts. I haven't
a clue
how to do this and was hoping some experts out there may offer some
help.
Basically I will have an xml file like this:
<statement>
<statementbody>
the quick brown fox<sup>2</sup> jumped over the lazy dog
</statementbody>
</statement>
My xslt translation file has the following:
<xsl:for-each select="statement">
<fo:block padding-bottom="2mm" text-align="justify" keep-with-
next="always"
font-size="10pt" >
<xsl:value-of select="statement"/>
</fo:block>
</xsl:for-each>
Will I have to reformat how the xml file is generated to enable me to
process the <sup> tags? eg.
It depends. If <sup> is a real XML node (i.e. not <sup>), then
the solution could be as simple as adding a matching template for
them, like:
<xsl:template match="sup">
<fo:inline baseline-shift="super">
<xsl:apply-templates />
</fo:inline>
</xsl:template>
HTH!
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]