Subject: RE: Recursive for loop & xslt 2.0
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 18 Jun 2009 11:21:34 +0100
|
> > But how can I use the index in the loop to write :
>
> as always in a for-each the current item can be accessed with .
>
> <xsl:for-each select="1 to 10">
> <br><b><xsl:value-of select="."/></b> hello world!
> </xsl:for-each>
And of course you can also do
<xsl:for-each select="1 to 10">
<br><b><xsl:value-of select="position()"/></b> hello world!
</xsl:for-each>
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
| Current Thread |
|
Michael Kay - 17 Jun 2009 12:32:26 -0000
|
|