Subject: RE: [xsl] 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 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Re: whats the best way to, SANWAL, ABHISHEK (HP | Thread | [xsl] Re: Re: whats the best way to, Dimitre Novatchev |
[xsl] Server-side transform with .a, Noelle | Date | RE: [xsl] XSLT to SVG Image not app, Mitchell, Lincoln L. |
Month |