Hi Andreas,

Thanks for the reply.

At the minute the <sup> tag is simply a html tag embedded into a text
string.
e.g "this is the body of text that has x<sup>2</sup> embedded in it"

The xml for this is (statement and statementbody are xml nodes created in my
application)

...
<statement>
   <statementbody>this is the body of text that has x<sup>2</sup> embedded
in it</statementbody>
<statement>


If I was to have the <sup> tags incorporated into the XML node structure how
would it look ?

forgive me but xslt translations are not my forte.

thanks


When you suggest having an XML node do you mean 


Andreas Delmelle-2 wrote:
> 
> On Jul 2, 2008, at 18:25, Andreas Delmelle wrote:
> 
>> On Jul 2, 2008, at 18:14, knoxor wrote:
>>
>>> <snip />
>>> 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 &lt;sup&gt;),  
>> 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>
> 
> Sorry, forgot to mention that your for-each also needs to be slightly  
> adjusted to something like:
> 
> <xsl:for-each select="statement/statementBody">
>    <fo:block ...>
>      <xsl:apply-templates />
>    </fo:block>
> </xsl:for-each>
> 
> To make sure the matching template for 'sup' is actually used...
> 
> 
> 
> Cheers
> 
> Andreas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-add-subscripts-dynamically---Guru-needed...-tp18241306p18254612.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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

Reply via email to