Re: Re: variable definition reuse
> > 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
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