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

RE: Incrementing a Global variable

Subject: RE: Incrementing a Global variable
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Thu, 28 Aug 2003 09:15:17 +0100
xpath global variables
> I am not asking to introduce variables as like in
> procedural languages.. 

Oh yes you are.
> and lets assume for e.g. -- this template is being
> processed at some point..
> <xsl:template matche="something">
>   <xsl:variable2 name="a" select="$a + 1" />
> </xsl:template>
> When the processor encounters the statement --
> <xsl:variable2 name="a" select="$a + 1" /> it will
> increment the value of "a" at a global place..

The key point is the phrase "When the processor". The effect makes the
result dependent on the order of execution. 

>Thanks for your reference about <xsl:for-each
>select="20 to 30"> ... but I could not see it on the
>XSLT 2.0 site -- http://www.w3.org/TR/xslt20/

The value of the select attribute can be any XPath 2.0 expression. "20
to 30" is an XPath 2.0 expression that returns a sequence of integers.

Michael Kay

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

Current Thread


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.
First Name
Last Name
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.