Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: XSLT incrementing count XSLT incrementing countTo: NULL Date: 9/5/2005 3:18:00 PM Hi, I am new to XSLT. My problem is that I wish to create an HTML table, and give each row an incrementing number from 1.This would increment every itteration of a for-each loop. The XSLT fragment I have tried is: <xsl:variable name="test" select="0"></xsl:variable> <table border="1"> <tbody> <tr bgcolor="#9acd32"> <th>Number</th> </tr> <xsl:for-each select="amsal_coverage_stats/core"> <tr> <td> <xsl:value-of select="$test+1"></xsl:value-of> </td> </tr> </xsl:for-each> However this just has the value 1. Any help would be much appreciated. Thanks. John. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
