[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] updating xsl:variable inside the loop

Subject: Re: [xsl] updating xsl:variable inside the loop
From: Manos Batsis <mbatsis@xxxxxxxxxxx>
Date: Thu, 29 Jan 2004 13:38:57 +0200

Arulraj wrote:

I am using xsl:variable inside the loop.
xsl:variable should be updated in next iteration. How to do this?

You cannot. The value of a variable, once initialized, cannot be changed.

Usually, you achieve your goal using xsl parameters, template calling and recursion. Your case is easier if i understand corfrectly as you can use the position function:

 <xsl:for-each select="child::*">
   <xsl:if test="(position() &lt; @rowindex)">
     <xsl:text>tableRow = new H2WTableRow();<xsl:text>



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread