Subject: Re: [xsl] variable incrementing in XSLT -- XSLT spec From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 27 Jun 2003 17:35:52 +0100 |
> Myself and many of us > fell that it a major handicap in writing programs > easily in XSLT. Side effect free programming is not unique to XSLT, it is a long established programming paradigm, designed to make things easier and more natural for people. It allows many optimisation strategies that are not available in imperative programming languages as code may be re-written and re-arranged by the optimiser with much more freedom. the use of "variable" in functional languages such as XSLT matches the use of the word in mathematics (where it originates). there is nothing at all natural in variables that change their value, that was an introduction in imperative programming languages which (due to limitations at the time) are designed to more closely model the machine implementation than the natural specification of a problem. > If there is a feature of full scale variables in XSLT, it > would make programming really easy. Not at all. If for example you could set a variable in one template and use its value in another, it would constrain the processor to evaluate templates in a specific order, which is not the case now, evaluation might be in any order, or parallelised across different threads, the fact that each template only returns a single result (like a mathematical function0 not change the state of arbitrary number of otehr variables makes this much easier to understand. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] variable incrementing in XSLT, Mukul | Thread | Re: [xsl] variable incrementing in , Udi |
RE: [xsl] variable incrementing in , Jim Fuller | Date | Re: [xsl] variable incrementing in , Udi |
Month |