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

Re: Another variable question

Subject: Re: Another variable question
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 3 Jun 1999 20:24:36 +0100 (BST)
xsl variable recalculate


> Because of the side-effect free nature of XSL, a bound variable cannot have
> its value changed.

> >(I cannot use counters
> >for this purpose because I  will have to do other operations in the future),

> You will need to recalculate the changing value you need, based on your
> changing position in the source node tree, each time you need a new value.

You don't necessarily need to recalculate. As in any other  functional
programming language, you don't have global variables (nasty things
anyway) but you can pass information explictly as arguments to
functions.

In the case of xsl this means declaring your variable as a
param-variable
in any template where it might be used, and explicitly passing on a
value via xsl:param in calls to xsl:apply-templates.

David


 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.