|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Increment a variable
Chandrashekar, XSLT variables are not mutable, unlike those in most
programming laguages -- this follows the thinking in functional languages
not allowing side-effects. Thus, doing something repeatedly is usually
achieved (in XSL 1.0) via recursion.
In your case: <xsl:template match="/">
<xsl:call-template name="fun1">
<xsl:with-param name="end" select="1000"/>
</xsl:call-template>
</xsl:template><xsl:template name="fun1"> <xsl:param name="end" select="0"/> <xsl:param name="start" select="0"/> <xsl:if test="$start < $end">
<xsl:call-template name="fun2"/>
<xsl:call-template name="fun1">
<xsl:with-param name="end" select="1000"/>
<xsl:with-param name="start" select="$start + 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template><xsl:template name="fun2"> ...etc </xsl:template> --A From: "ChandraShekar, A" <ChandraShekar.A@xxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: Increment a variable Date: Thu, 18 Aug 2005 10:04:39 +0530 _________________________________________________________________ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








