|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xsl variables
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








