[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: Keeping a running total?
At 2006-07-12 12:52 -0400, Steve wrote:
Forgive me for the tangent, especially if it sounds ignorant, but as a newbie to XSL I have a hard time understanding the benefit in not being able to redefine a variable. While I do not doubt the talent and genius that went into the above examples and speculations, I can't imagine a benefit that outweighs the time economics involved in coming up with the above solutions, versus simply doing a $variable = $variable - $x and being done with it in 10ish lines.
XSLT is side-effect free, by design, thus not allowing things like changing variables (which are side effects). Consider that, with the given design, once you implement and debug a given XSLT template rule, there is nothing possible *by design of the language* that would break the functioning of that template rule. I would think just that savings in debug time alone would outweigh any savings in development time. Also, a single template rule can be applied *simultaneously* to multiple source tree nodes, with the resulting result tree fragments assembled in current node list order ... which would make your legacy programming requirement possible. Please check the archives ... this question has been asked often since XSLT was standardized in 1998. Please weigh innovation with legacy approaches when you are considering the arguments. I hope this helps. . . . . . . . . Ken
|
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
|