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

Re: variable incrementing in XSLT -- XSLT spec

Subject: Re: variable incrementing in XSLT -- XSLT spec
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 27 Jun 2003 17:35:52 +0100
xslt mathematics
> 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

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.