Subject: RE: [xsl] how to: Conditionally call nested XSLs based on parameters or variables passed to it at a higher level? From: "SANWAL, ABHISHEK (HP-Houston)" <abhishek.sanwal@xxxxxx> Date: Fri, 12 Sep 2003 11:17:02 -0500 |
Michael. Dimitre Please have a look at this. http://www.biglist.com/lists/xsl-list/archives/200309/msg00470.html Here I have implemented with the help of a number of significant people, a parameter passing model that goes into nested templates ( basically templates that are called by others, i.e. where X calls Y but Y can never call X. It's kind of Y nested inside X. I am trying to do the same for the entire document stylesheets I have so that I do not have to hard code the stuff. Of course, Dimitre in effect I want to achieve the functional programming paradigm while maintaining XSL 1.0 specs ( the ones current supported by the System.Xml.Xsl transform ) ( I do know that Saxon supports XSLT 2.0 with Functions but I cannot use those things.) Also, the FXSL project. Are they a set of XSL based extension libraries or will I actually need to install "extension" code with my XSLT processor. I would like to remain "pure" xsl 1.0 as much as possible. So, any comments or ideas based on the (above URL) and improving that would be great. Any other "pure XSL" ideas would be nice. I have printed out that whitepaper of yours that talks about " One particularly elegant way to deal with parameters scoping is by using partial application -- described in the second reference above. " Thanks for the great advice. If I get this done I will post a report on it. Thanks, Abhishek Sanwal HP - Houston Campus abhishek.sanwal@xxxxxx -----Original Message----- From: Michael Kay [mailto:mhk@xxxxxxxxx] Sent: Friday, September 12, 2003 5:18 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] how to: Conditionally call nested XSLs based on parameters or variables passed to it at a higher level? > BASICALLY: I want to define Variables/Parameters within a > section and ONLY for a section and ALL its CHILDREN below it. > I do not want these variables to become global as I will be > using the "same" name (is that even possible) variables for > OTHER sections. I don't know what you mean by a section. If a section is within a template, you can use local variables. If by "section" you mean part of a module, or anything bigger than a template but smaller than the entire stylesheet, then the answer is that it's not possible. But you can use namespaces as part of the variable name to ensure that the risk of a conflict is negligible. Michael Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] how to: Conditionally cal, Michael Kay | Thread | [xsl] Re: how to: Conditionally cal, Dimitre Novatchev |
[xsl] Basics of XML Schema inherita, Rao, Rajesh | Date | [xsl] Embedding javascript with xsl, Abhijit Junnare |
Month |