[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Passing parameters to an indirectly called templat
Kannan wrote:
Can I pass parameters like this. That you turned into an infinite loop has to do with a bug in your programming logic, not the passing itself. And probably you mean that the recursion went too deeply nested (but this may feel like a "loop"). In XSLT 1.0, the method of programming is certainly viable. But as soon as a new step is required between one and another template, you must remember to pass on the parameters again (which can become a maintenance nightmare) What you are after is what Michael Kay suggested: the XSLT 2.0 feature of tunneling parameters which can be defined once and will be passed on until it matches a template that defines these parameters (where you must also specify that they are tunneled). If you have to stick to XSLT 1.0, using global parameters may be the easiest way to go. If you want to modularize or "hide" the variables, you can use an imported stylesheet which defines its own "global" parameters (variables). Cheers, -- Abel Braaksma
|
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
|