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

RE: XLST 2

Subject: RE: XLST 2
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sat, 22 Nov 2003 08:42:53 -0000
xlst variable
> 
> guys I'm quite new to XSLT myself...

Yep, we can tell: it takes a while before your fingers learn to type
"XSLT" correctly.

 i have a very basic 
> question. Why is it that a xsl:variable is a "final static" 
> variable rather than a "variable" in the true sense of the 
> word which allows us to reassign values to it? Karthikeyan.R

XSLT is using "variable" in the true sense of the word, as it was
originally used in mathematics (consider the formula area = length ×
width, where length and width are variables); its use in procedural
programming languages is a corruption.

As for why the language is designed this way, I refer you to the essay
in Chapter 9 of my book "XSLT Programmer's Reference". The short answer
is that it's based on the theory of functional, declarative programming,
and that this is a Good Thing because (a) it reduces your scope for
making errors and (b) it provides greatly increased scope for XSLT
processors to execute your stylesheet in clever optimized ways.

The downside is that if (like me) you've been using procedural
programming languages all your life, then it takes a bit of learning.
The upside of that is that you will reach an "aha" point where you
realize that the rest of your life has been misspent.

Michael Kay


 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.