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

RE: New XT release

Subject: RE: New XT release
From: "Jonathan Borden" <jborden@xxxxxxxxxxxx>
Date: Wed, 21 Apr 1999 22:46:39 -0400
thread xt 39
All of this terminology is unfortunate. The real issue is keeping XSL
expressions side-effect free. Perhaps the term "xsl:value" or "xsl:symbol"
would be more correct, the point being that this expression is really only
an optimization for frequently occuring (and invariant!) expressions. The
terms 'variable' and 'symbol' are frequently interchanged and this is
correct in many but not all contexts.

The xsl:variable "x" is still a variable, varying its value from scope to
scope, from source tree to source tree, from stylesheet to stylesheet and
perhaps from invocation to invocation. The side-effect free rule requires
that once "x" is bound to a value, the value cannot change within its scope
within the transformation.

This behavior is one of the principle differences between functional and
procedural languages.

Jonathan Borden
http://jabr.ne.mediaone.net


>
> At 99/04/21 12:46 -0500, Paul Prescod wrote:
> >> [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.
> >[Frank Christoph]
> >> I can't resist replying to your appalling suggestion that
> "variable" is a
> >> misnomer here.
> >
> >> 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.
> >
> >There is something too subtle for me to follow there. x does not vary.
>
> Remember your high school algebra:
>
>    5x + 4y + z = 17
>    6x - 2y + z = 6
>    2x + 3y - z = 4
>
> Wasn't these problems called "3 equations with 3 variables" in Ontario
> schools?  In this case the values are, indeed, constants, but I
> thought the
> placeholders themselves were called "variables".
>
> But now that I actually write this down, I remember also calling these
> problems "3 equations with 3 unknowns", so I wonder if I'm misremembering
> the phrase "3 equations with 3 variables" ... but this
> recollection was the
> particular reason why I was so ready to accept Frank's definition of
> "variable".
>
> None of my DSSSL students ever supported the use of the term
> "variable" the
> way that Frank did in his note.  We were all of the opinion it
> was a misnomer.
>
> .......... Ken
>


 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.