I do actually the same in this function:
<xsl:function name="nxp:getRowSpanForSymbolAndParameter" as="xs:integer">
<xsl:param name="_currentRowSpan" as="xs:integer"/>
<xsl:param name="_currentRow"/>
<xsl:param name="_nextRow"/>
<xsl:choose>
<!-- we check next rows recursively -->
<xsl:when test="deep-equal($_currentRow/entry[1], $_nextRow/entry[1]) and
deep-equal($_currentRow/entry[2], $_nextRow/entry[2])">
<xsl:value-of
select="nxp:getRowSpanForSymbolAndParameter($_currentRowSpan + 1, $_nextRow,
$_nextRow/following-sibling::row[1])"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$_currentRowSpan"/>
</xsl:otherwise>
</xsl:choose>
</xsl:function>
The currentrowspan is increased on each recursive call. But you can easily use
the same approach when using templates.
Cheers,
Robby
-----Original Message-----
From: George [mailto:news(_dot_)net(_at_)gmx(_dot_)net]
Sent: Thursday, March 25, 2010 9:02 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] recursive loop in XSL stylesheet is failing
Great stuff!!
Thank you very much, guys.
Send you some virtual drinks.
Cheers,
George
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--