Subject: Re: [xsl] increment variable with xsl:for-each From: Brian Chrisman <brian.chrisman@xxxxxx> Date: Fri, 26 Mar 2004 11:06:17 +0100 |
hello I'm looking for a code to increment a variable in xsl:for-each loop
I ended up here:
<xsl:variable name="a">1</xsl:variable>
<xsl:for-each select="name">
You may be looking for: <xsl:variable name="a" select="count(name)"/> or possibly: <xsl:for-each select="name"> <count><xsl:value-of select="position()"/></count> </xsl:for-each>
<xsl:value of select="{$a+1}"/> <xsl:value of select="{$a}"/>
</xsl:for-each>
thanks for any answer
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] increment variable with xsl:f, Tuan Luu | Thread | RE: [xsl] increment variable with x, M. David Peterson |
[xsl] Producing a Table of Contents, Julian Voelcker | Date | RE: [xsl] Producing a Table of Cont, M. David Peterson |
Month |