Re: [xsl] Re: XSL-List Digest V3 #713

Subject: Re: [xsl] Re: XSL-List Digest V3 #713
From: VZAKON@xxxxxxxxxxxxx
Date: Wed, 25 Apr 2001 09:31:00 -0400
This XSL...

<xsl:stylesheet version="1.0" xmlns:xsl="";>
	<xsl:template match="/">
		<xsl:call-template name="loop">
			<xsl:with-param name="until" select="5"/>

	<xsl:template name="loop">
		<xsl:param name="until"/>
		<xsl:param name="x">0</xsl:param>
		<xsl:if test="$x &lt; $until">
			<!-- do something with $x -->
			<xsl:value-of select = "$x"/><br/>

			<!-- increment x -->
			<xsl:call-template name="loop">
				<xsl:with-param name="until" select = "number($until)"/>
				<xsl:with-param name="x" select = "number($x)+1"/>

... will "transform" any xml into:



>Date:Tuesday, 24 April 2001 1:06pm ET
>Subject: Re: [xsl] Re: XSL-List Digest V3 #713
>I think it is a little difficulty for xslt to do this,because in xslt,the
> of varialbe can not be reset.
>ÔÚ 2001-04-24 18:06:00 ÄúдµÀ£º
>>Can anybody help me to solve this. I am using a for loop to display some
>>information. In that loop i want increment the value of a variable i.e.,
>>x=x+1. How to do this in xsl.
>>Advance thanks
>> XSL-List info and archive:
>Best regard
>            HeHangjun
>            sameulhe@xxxxxxx
>			hehangjun@xxxxxxxx
> XSL-List info and archive:

 XSL-List info and archive:

Current Thread