This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: asigning values to variables
- From: "James Fuller" <james dot fuller at o-idev dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 22 Jul 2002 21:32:46 +0100
- Subject: Re: [xsl] asigning values to variables
- Organization: o-iDeveloper ltd.
- References: <026501c231bc$3d095670$0900000a@vader>
- Reply-to: xsl-list at lists dot mulberrytech dot com
----- Original Message -----
From: "Esteban Gonzalez" <egonzalez@outside.com.ar>
To: <xsl-list@lists.mulberrytech.com>
Sent: Monday, July 22, 2002 9:13 PM
Subject: [xsl] asigning values to variables
> Hi!...
>
> I´m trying to do something like
>
> var = var +1;
>
> everything points out that it is not possible to do so in XSLT...
<xsl:call-template name="for.loop">
<xsl:with-param name="i">1</xsl:with-param>
<xsl:with-param name="count">10</xsl:with-param>
</xsl:call-template>
<!-- Rename "old name" elements to "new name" -->
<xsl:template name="for.loop">
<xsl:param name="i"/>
<xsl:param name="count"/>
<xsl:if test="$i <= $count">
<!-- body of the loop goes here -->
</xsl:if>
<xsl:if test="$i <= $count">
<xsl:call-template name="for.loop">
<xsl:with-param name="i">
<!-- Increment index-->
<xsl:value-of select="$i + 1"/>
</xsl:with-param>
<xsl:with-param name="count">
<xsl:value-of select="$count"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
hear read up on it
http://www.dpawson.co.uk/xsl/sect2/N8090.html
gl, jim fuller
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list