xsl-list
[Top] [All Lists]

RE: XLST 2

2003-11-22 01:42:53

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



<Prev in Thread] Current Thread [Next in Thread>