[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: New XT release
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|