Hi I hava a xsl question.
How do I get the position of the parent a in the in the template for
b?
Example:
<root>
<a>
<b></b>
</a>
<a>
<b></b>
</a>
</root>
<xsl:template match="/root">
<xsl:apply-templates select="a"/>
</xsl:template>
<xsl:template match="a">
<xsl:apply-templates select="b"/>
</xsl:template>
<xsl:template match="b">
<xsl:value-of select="../position()"/>
</xsl:template
Oleg Tkachenko - 30 Jun 2003 16:44 GMT
> How do I get the position of the parent a in the in the template for
> b?
[quoted text clipped - 20 lines]
> <xsl:template match="b">
> <xsl:value-of select="../position()"/>
<xsl:value-of select="count(../preceding-sibling::*)+1"/>

Signature
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel