This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Calling a template dynamically?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] Re: Calling a template dynamically?
- From: Dimitre Novatchev <dnovatchev at yahoo dot com>
- Date: Tue, 13 Nov 2001 07:47:12 -0800 (PST)
- Reply-to: xsl-list at lists dot mulberrytech dot com
> 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