This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Calling a template dynamically?


> but this doesn't work, as it doesn't the following:
> 
> <xsl:call-template name="{$templatename}">
> 

Templates cannot be called dynamically in XSLT.

But they can be ***instantiated*** dynamically. This is the base for the generic
templates approach. 

In fact, in my recent posts I have presented XSLT implementations of some very
general functional programming functions/design patterns (e.g. foldl), which can be
used to produce a multitude of other useful functions (e.g. maximum, sum, product,
sum of products, reverse, ... etc.), depending on the functions passed to them as
parameters.

It is important to realise the benefits that a sound, systematic functional approach
gives us, especially in building libraries of standard, reusable, highly
inter-operable functions. Compared to such a systematic functional approach, any
present attempt to build a "standard XSLT (or extensions) library" or even the most
systematic book about XSLT problem solving techniques, looks more like a bag of
tricks, than something based on a fundamental, systematic approach.

Cheers,
Dimitre Novatchev.



__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]