|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: foreach, preceding-sibling::node() and following-
I am not sure what you want either.
For the examples of your input and output the following three
templates should work:
<xsl:template match="abs">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="idlink">
<xsl:variable name="urlnumber" select="count(preceding::idlink)+1"/>
<a href="url{$urlnumber}"><xsl:value-of select="."/></a>
</xsl:template>
<xsl:template match="i|b|u|em"> <!-- And more elements -->
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
<!-- This template is not needed as this is the same as the default
template for text nodes, but is added for clarity: -->
<xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template>
Is this what you need?
Regards,
Ragulf Pickaxe :-)
On 10/26/05, David Carlisle <davidc@xxxxxxxxx> wrote:
>
>
> > Actually, I do want the content between the two idlinks and, that's where
> > I'm stuck. This is what I need:
> > Xml input file:
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








