I have this Following XSLT snippet:
<table border="1" id ="test">
<xsl:for-each select= "TestSuite/TestCase">
<tr>
<xsl:attribute name="id">
<xsl:value-of select="count(preceding-sibling::*)"/>
</xsl:attribute>
<b><xsl:value-of select="@name"/></b>
</tr>
<xsl:for-each select="Verification|Command">
<tr>
<xsl:attribute name="id">
<xsl:value-of select="count(preceding-sibling::*)"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="contains(name() , 'Verification')">
<td>Verification <xsl:value-of select="@type"/></td>
<td><xsl:value-of select="@status"/></td>
</xsl:when>
<xsl:when test="contains(name() , 'Command')">
<td>Command <xsl:value-of select="@type"/></td>
<td><xsl:value-of select="@status"/></td>
</xsl:when>
</xsl:choose>
</tr>
</xsl:for-each>
</xsl:for-each>
</table>
Now I would simply like to give each table row an id starting with 0, 1 then 2 etc. The problem is that every inner loop starts the id counting by 0 again. How can I solve this? My HTML Page shows only one table so all tr should be siblings.