RE: RE: [xsl] Recursively looping through a template only X number of times?
by cknell other posts by this author
Nov 28 2006 12:36PM messages near this date
|
[xsl] XML design for XSLT (was Re: [xsl] Standards checkers for XSLT)
& XSLT I don't where you got the idea that <xsl:param> can't be a child of <xsl:template>, b
ut that is not so.
--
Charles Knell
cknell@[...].com - email
-----Original Message-----
From: Austin, Darrel <Darrel.Austin@[...].us>
Sent: Tue, 28 Nov 2006 13:16:44 -0600
To: <xsl-list@[...].com>
Subject: RE: [xsl] Recursively looping through a template only X number of times?
> You want to use template parameters. Declare xsl:param inside
> the template, and use xsl:with-param to set a value on the call.
The problem appears to be that xsl:with-param can not be a child of
xsl:template, so I can't call the template recursively while changing
the param value.
> Just have
> <xsl:variable name="tocdepth" select="2"/>
> then wrap your code in
> <xsl:if test="count(ancestor::ruleItem)<=$tocdepth">
> .. make a toc entry...
> </xsl:if>
Of course! Makes perfect sense. That works nicely.
That said, I'm still curious as to how (or if) one can create recursive
logic that can 'count' the recursions via XSL.
-Darrel
--~------------------------------------------------------------------
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@[...].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@[...].com>
--~--
|