Subject: Re: updating xsl:variable inside the loop
From: Manos Batsis <mbatsis@xxxxxxxxxxx>
Date: Thu, 29 Jan 2004 13:38:57 +0200
|
Arulraj wrote:
Hi,
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() < @rowindex)">
<xsl:text>tableRow = new H2WTableRow();<xsl:text>
</xsl:if>
</xsl:for-each>
hth,
Manos
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- RE: Which commands to use: xsl:if, xsl:when, xsl:choose, xsl:otherwise ??
- JWolpert - Tue, 27 Jan 2004 14:47:06 -0500 (EST)
- Arulraj - Thu, 29 Jan 2004 06:12:01 -0500 (EST)
- Manos Batsis - Thu, 29 Jan 2004 06:38:23 -0500 (EST) <=
- David Carlisle - Thu, 29 Jan 2004 06:59:40 -0500 (EST)
- Arulraj - Thu, 29 Jan 2004 08:30:58 -0500 (EST)
- David Carlisle - Thu, 29 Jan 2004 09:59:40 -0500 (EST)
- Arulraj - Thu, 29 Jan 2004 23:36:57 -0500 (EST)
|
|