Subject: Increment a Value in xsl:for-each
From: "Raj Avula" <raj_avula@xxxxxxxxxxx>
Date: Thu, 8 Mar 2001 12:54:26 -0800
|
Hi,
I am using xsl:for-each to read all the nodes with the same name at the
same level in my xml file.
I have to actually read two nodes at one time.
eg:
<Customer>
<Address/>
<Address/>
<Address/>
<Address/>
<City/>
<City/>
<City/>
<City/>
</Customer>
In xsl:for-each I have to read first Address and First City for the first
time,
Second Address and second City second time and so on.
My XSL template is
<xsl:variable name="iCount" select="1"/>
<xsl:for-each select="Address">
<xsl:value-of select="Address"/>
<xsl:value-of select=../City[position()=$iCount"/>
</xsl:for-each>
I have to increment iCount in for loop.
Can you please tell me how can I increment iCount in for-each loop.
Thanks,
Raj
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- Substituting value in XML Attribute, (continued)
- Raj Avula - Thu, 8 Mar 2001 13:40:33 -0500 (EST)
- Goetz Bock - Thu, 8 Mar 2001 13:52:51 -0500 (EST)
- Raj Avula - Thu, 8 Mar 2001 14:22:05 -0500 (EST)
- Alex Reuter - Thu, 8 Mar 2001 14:08:42 -0500 (EST)
- Raj Avula - Thu, 8 Mar 2001 15:55:21 -0500 (EST) <=
- Jeni Tennison - Thu, 8 Mar 2001 17:06:39 -0500 (EST)
- Raj Avula - Thu, 8 Mar 2001 17:16:35 -0500 (EST)
- David Carlisle - Thu, 8 Mar 2001 17:48:47 -0500 (EST)
- Michael Kay - Fri, 9 Mar 2001 05:50:38 -0500 (EST)
|
|