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

RE: xsl variables

Subject: RE: xsl variables
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 15 Sep 1999 17:59:15 +0100
xsl variable index iterate
> I have a trouble with an XSL file where I would like to define a
> variable and increase it to reference different repetitions in an EDI
> document.

That's not the way to iterate in XSL, because you can't update variables.
You need to use a recursive approach. There are several recent examples of
this on this list.
 
> <xsl:variable name="index" expr="1"/>

The current syntax is select="1" but it depends which XSL product you are
using.

> <xsl:for-each select="//NAD2[indice]">

You don't need to specify a "subscript" in for-each: the select-expression
should evaluate to the set of nodes you want to process, not to an
individual node in the set. While you are processing an individual node, you
can determine its position in the set using the position() function.

Mike Kay


 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.