|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Re: Re: variable definition reuse
Subject: Re: Re: Re: variable definition reuse
From: "Laura Jenkins" <xsl_list@xxxxxxxxxxx>
Date: Mon, 25 Mar 2002 13:38:59 +0000
|
Dear Dimitre..
Could you please put some more light into the following lines you put??
I think that using a partial application of a function is a complete
and better solution to the so called "dynamic scoping" problem..
Could you please let me know any reference documents that i may refer to do
that?? I havent got a clue of how to do that.
laura
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Re: variable definition reuse
Date: Fri, 22 Mar 2002 11:10:48 -0800 (PST)
> > 1. it is possible to do define element specific variables in a
> > different file??
>
> Not through XSLT means. By definition, element-specific variables are
> local to the place where you're processing the element. The only
> variables that you can share across stylesheets are global variables.
> If you were only interested in (for example) the exp-date element
> child of the first Product in your file, then it would be fine.
>
> You could, however, do this through entities.
Hi Jeni,
A better approach is to treat the template that processes a specific
node as function and to produce a partial application of this function,
in which a number of parameters have been bound to specific values.
This bindings will remain through the lifetime of the partial
application (an RTF) and will be in place every time it is
instantiated.
I think this is very close to (or maybe exactly) what Laura wishes to
have.
Also note, that the binding are produced at runtime and could be
dynamic, depending on specific conditions that are unknown in advance.
This is another advantage over the entities approach.
I think that using a partial application of a function is a complete
and better solution to the so called "dynamic scoping" problem.
Currying and partial application are available as part of the FXSL
functional programming library.
Cheers,
Dimitre Novatchev.
__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
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
| RSS 2.0 |
|
| Atom 0.3 |
|
|