I am using XSLT transformation to display XML file in ASP.NET 2.0 and I want to make A table of content similar as in the page of following link given .
http://www.w3.org/TR/REC-CSS2/selector.html
My Code of xslt page is :
Code: ( text )
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="TARGETCATEGORY">
<table border="2" BorderColor="#DEBA84" height="50px" Width="436px" layout="fixed">
<tr><td colspan="2">
<a href="#{@Name}"><xsl:value-of select="@Name"/></a>
<xsl:variable name="node1">
<xsl:value-of select="@Name"/>
</xsl:variable>
</td></tr>
</table>
<xsl:apply-templates/>
</xsl:template>
<xsl:template name="sub" match="SUBCATEGORY">
<table border="2" BorderColor="#DEBA84" Width="436px" layout="fixed">
<tr><td colspan="2">
<a href="@Name" onClick="count(i=i+1); return;"><xsl:value-of select="@Name"/></a>
<a name="Top"></a>
</td></tr>
</table>
</xsl:template>
</xsl:stylesheet>
I want to assign a number to each anchor tag dynamically.
Please help me.......!!!!!!!!!!!!!!!!!!!!
thanks in advance.
Abhinav