[Home] [By Thread] [By Date] [Recent Entries]
Hi Jan, Please try the following stylesheet: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" /> <xsl:template match="/theExampleXMLTree">
<xsl:text>NodeNr.|Value 
</xsl:text>
<xsl:for-each select="Node">
<xsl:variable name="count">
<xsl:call-template name="XYZ">
<xsl:with-param name="nodeset"
select="following-sibling::*" />
<xsl:with-param name="n" select="0" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="position()" />|<xsl:value-of
select="$count" /><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template> <xsl:template name="XYZ">
<xsl:param name="nodeset" />
<xsl:param name="n" /> <xsl:choose>
<xsl:when test="$nodeset[1]/@count-me = 'yes'">
<xsl:call-template name="XYZ">
<xsl:with-param name="nodeset"
select="$nodeset[position() > 1]" />
<xsl:with-param name="n" select="$n + 1" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$n" />
</xsl:otherwise>
</xsl:choose></xsl:template> </xsl:stylesheet> Regards, Mukul On 6/28/06, news@xxxxxxxxxxx <news@xxxxxxxxxxx> wrote: Hello List,
|

Cart



