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

RE: Re: whats the best way to create and use values fo

Subject: RE: Re: whats the best way to create and use values for lookup (key-value) such that you can loop through it with limits
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 16 Sep 2003 00:08:10 +0100
small talk carlisle

> Of course, what Dimitre suggested was good. But at that point of time
> since document() was being used, I was thinking that this would only do
> global scope variables and wondering if there is a way to localize it.

The scope of variables is lexical scope based on position in the styleshsheet
document() is about selecting different nodes in the source so is
totally irrelevant to variable scope. You seem to be thinking in terms
of dynamic scope, but XSLT does not have dynamically scoped variables.

> (My thinking was flawed as I was still thinking in terms of standard
> programming languages..(done too much of it all for majority of my 25
> years)

Functional programming has I think a longer history than OO (lisp's
older than smalltalk, I'm sure), so one persons "standard" language is
another's new upstart....

> Are functional languages better than OOP languages
That's like asking is English better than German, or Fortran better than
Algol. It all depends what you are doing, and who you are.

> Hopefully if they are in different <Sections > they should not conflict
> on names? I'll check it out./:)
Difficult to parse that sentence in the context of xslt.
if what are in different sections? if your <Sections> are in the input
doc then there is no sense in which any variables are defined "in" them
at all. As variables don't have dynamic scope you never get run time
name clashes it is expliclt at compile time the variable binding that is
in scope for any variable reference.


David


 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.