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

Re: Re: variable definition reuse

Subject: Re: Re: variable definition reuse
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 22 Mar 2002 11:10:48 -0800 (PST)
define specific variable
> > 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


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.