Re: Re: Re: Re: Re: Call Template with variable name
> >> > >>Just thought that one of the techniques I am using in my "stylefree > >>stylesheets" can apply here... > >> > > > > Eric, the technique you're describing is 100% the same as the one used in generic > > templates. > > > Arg. I should read more slowly, the introduction had let me think this > would me much more complex than what I was proposing! > > > The only minor difference is that you're passing as parameter the name of > > the template to be instantiated (and this could lead to some unwanted naming > > resolution problems when templates are being imported), while when using generic > > templates one passes just the unique node, which is uniquely matched by the template > > to be instantiated. > > > That's a good point. > > I don't think you are using the information that may be conveyed by what > I have called the "hooks", though and I think there is, here, a > possibility to pass useful info to the template in a less verbose way > than using an additional parameter. No "additional" parameter is used with generic templates. Regardless whether "hooks" or generic templates are used, the data that is used to uniquely identify the node (and the template that will match it) -- this data must be the value of some variable or parameter. In your examples you're using the $abc variable, and it serves the same purpose as the template reference parameter, passed to a generic template. Also, I'm using the assumption that the authors of the generic template and the templates that use (call) it are completely different persons, most probably not knowing anything about each other. Therefore, generic templates will come handy in writing applications to be used as a base for the development of other applications -- e.g standard template libraries. Cheers, Dimitre Novatchev. __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.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