[no subject]

	<div id="rulesListTOC">
		<xsl:for-each select="ruleItems/ruleItem">
			<xsl:call-template name="rulelistTOC" />

<xsl:template name="rulelistTOC">
<xsl:for-each select="ruleItem">

		<li><a href="#{position()}"><xsl:value-of
select="number" />: <xsl:value-of select="title" /></a>
			<xsl:if test="ruleItem">
name="rulelistTOC" />

The problem is that the 'position()' is reset during each loop of the
recursion. So my links end up as:


Is there a way around that? Or, perhaps to ask the question more
generally, what method would people recommend for creating a unique
number for each node of the recursive loop?

The 'easy' solution would be for me to just store the unique ID stored
in the database for each node within the XML itself, but I was wondering
if there was a solution on the XSL side of things before I recreate the
XML files.


Current Thread