[Home] [By Thread] [By Date] [Recent Entries]
Probably your XML is something like this:
<root>
<a name="1">
<b>
<c/>
</b>
<b>
<c/>
</b>
</a>
<a name="2">
<b>
<c/>
</b>
<b>
<c/>
</b>
<b>
<c/>
</b>
</a>
<a name="3">
<b>
<c/>
</b>
<b>
<c/>
</b>
<b>
<c/>
</b>
<b>
<c/>
</b>
</a>
</root>The following stylesheet when applied to the above XML: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" /> <xsl:template match="/root">
<xsl:for-each select="a">
<xsl:for-each select=".//c">
<xsl:value-of select="position()" /><xsl:text>
</xsl:text>
</xsl:for-each>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template></xsl:stylesheet> Produces output: 1 2 1 2 3 1 2 3 4 If this is not what you need, please provide more details. On 10/2/06, Jonathan Marenus <jonathanmarenus@xxxxxxxxx> wrote:
-- Regards, Mukul Gandhi
|

Cart



