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

Variables and constants

Subject: Variables and constants
From: John Lam <jlam@xxxxxxxxxxxx>
Date: Fri, 25 Feb 2000 08:16:45 -0500
variables constants in xslt
This is more of a philosophical question. Since I haven't worked with
functional programming languages before, can anyone explain to me the
rationale for not having true variables a'la procedural programming
languages (i.e. you can re-assign the value of an existing variable)? 

Clearly this was an intentional design decision, but it makes it impossible
to do any kind of simplistic calculation (e.g. totalling a shopping cart
that has price and quantity information for each item) without resorting to
recursion. I feel that a lot of folks who will wind up using XSLT
(client-side DHTML developers in particular) will want to do things like
render a shopping cart for display *and* total the items in the shopping
cart without having to do the rendering transform using XSLT and the
totalling action by writing JavaScript code to walk the DOM.

Can anyone shed any light on why variables == constants in XSLT?

Cheers,
-John


 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.