Re: [xsl] correction:How to do a subscript from <sup>-34</sup>

Subject: Re: [xsl] correction:How to do a subscript from <sup>-34</sup>
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Tue, 7 May 2002 16:19:39 -0400
<pandianoliver@xxxxxxxxxxxx>]

How can I go through my xml file and replace the following with subscript:
<sup>-34</sup>

[Tom P]

Assuming that you want to change that to

<sub>-34</sub>

you can use

<xsl:template match='sup'>
    <sub><xsl:value-of select='.'/></sub>
</xsl:template>

To make sure this template gets called, you will want to have some variation
of <xsl:apply-templates> in the stylesheet.

If there could also be child elements within the "sup" element, you could
use

<xsl:template match='sup'>
    <sub><xsl:apply-templates/></sub>
</xsl:template>


For sub- and super-scripts, probably not needed.

Cheers,

Tom P


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread