[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Incrementing variables

Subject: Incrementing variables
From: "Joerg Colberg" <joerg.colberg@xxxxxxxxxxx>
Date: Tue, 5 Sep 100 16:30:12 EDT
incrementing variables
   How can one use incremental variables? Assume I have a node NODE1 which has, say, ten, children (NODE2). Assume I define the following variable:
<xsl:variable name="var" select="NODE1/NODE2[1]"/>
This gives me the first child of NODE1. How do I go to the next child
and then the next child etc. that is how can I run an iteration over
the children? I tried
<xsl:variable name="var" select="$var/following-sibling::"/>
but that didn't do it.
   The question might sound funny - can't I use a for-each loop? The
reason why I can't in my particular context is because I have to
use the variable inside a for-each loop. What I basically want to
increment the child every time the for-each loop goes to the next
node. Sounds a little weird but that's (partly) because the problem
is given out of context here.

I'd appreciate any tip!

Thanks, Joerg

Dr Joerg M. Colberg
Econovo Software, Inc.
joerg.colberg@xxxxxxxxxxx


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.