[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Global variables and changing within templates
> If I define a global variable, how can I pass it to a template, change > it within the template, and be able to access the new value for the > variable after the template processing is complete ? There are two answers here. (1) You can't. You need to learn how to use recursion to achieve the desired effects. (2) You can if you use an extension mechanism like saxon:assign; that depends on your XSL processor. I'm not going to engage in gross generalizations about the necessity of saxon:assign and the like, but I have yet to encounter a problem that I couldn't solve without it, including writing an XSL word-counting script. To turn one's back on problem-solving with modifiable variables, and to know recursion, is to know XSL. Steve 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
|