|
Subject: Re: New XT release From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 21 Apr 1999 08:47:44 -0700 |
At 99/04/21 08:58 -0500, Paul Prescod wrote:
>I'm not sure why xsl:constant is now named xsl:variable. I see no way of
>assigning to them (other than declaring them!) so they are not really
>variable.
Paul, this is the way I felt until I expressed the same opinion on the
DSSSL list and was promptly (and heavily) chastized for having expressed
such a misleading comment!
:{)
I wouldn't dare chastize you (or anybody else) since I felt the same way
myself, so I'll just let you read what was said to me.
Since reading Frank's comments, I agree with his reasoning and now better
understand the specification writers' use of the term.
I hope this helps.
........ Ken
From: "Frank A. Christoph" <christo@xxxxxxxxxxxxxxxxxx>
To: <dssslist@xxxxxxxxxxxxxxxx>
Subject: Re: Global variable
Date: Tue, 2 Mar 1999 12:20:38 +0900
[G. Ken Holman]
>You can calculate and bind values to variables (a bit of a misnomer since
>they can't vary!) within a given (let) scope, you can bind a fixed value to
>a top level variable, but you can't change the value of a variable once
bound.
I can't resist replying to your appalling suggestion that "variable" is a
misnomer here. This contradicts at least 400 years of a mathematical
practice. If anything, it is the use of the word "variable" in imperative
programming languages like C that is misleading (not because C variables
aren't variables, but because they are much more sophisticated than plain
old everyday variables).
A variable in the mathematical sense most certainly _does_ vary; it varies
over its domain of values. It is the _denotation_ of such a variable that
does not vary, i.e., its meaning, what it refers to. If I write, for example,
(define x 6)
then I am saying that 1) x is a DSSSL variable, and hence it varies over
the set of DSSSL values, and 2) its _value_ happens to be the constant, 6.
The fact that x is a variable, not a constant, is evident from the
semantics of DSSSL expressions, which dictate that I can substitute the
value of x for any occurrence of x without changing the meaning of
enclosing expressions (well, not really, but for the most part this is
true). The definition above expresses the fact that x = 6; consequently,
for any expression E in the scope of this definition, I can substitute 6
for x in E, written E[6/x], and be assured that E = E[6/x] because x = 6.
For example, (+ x x)[6/x] = (+ 6 6) follows from x = 6 which follows from
(define x 6) being in (the nearest) scope. More generally, this is known as
Leibniz's law of substitution of equals (for equals).
--FC
--
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
Website: XSL/XML/DSSSL/SGML services outline, XSL/DSSSL shareware,
stylesheet resource library, conference training schedule,
commercial stylesheet training materials, on-line XSL CBT.
Next instructor-led XSL Training: WWW8:1999-05-11
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: New XT release, Paul Prescod | Thread | Re: New XT release, Paul Prescod |
| Re: New XT release, Simon St.Laurent | Date | Re: About XSLT, G. Ken Holman |
| Month |