|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Another variable question
> 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
|
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








