Re: [xsl] dynamic template caller problems

Subject: Re: [xsl] dynamic template caller problems
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Mon, 31 Jul 2006 00:04:33 +0530
On 7/30/06, Smoother@xxxxxx <Smoother@xxxxxx> wrote:
<xsl:value-of select="$template" /> <!-- e.g. 'template_b' -->

 <!-- This will not work, since name= always requires a QName :( -->
 <xsl:call-template name="$template" />

<!-- ??? how to call/apply the related template ??? -->

</xsl:template>
My question is, how I realize this idea of a dynamic template caller best. Thanks in advance, S. Renault.

With XSLT, we cannot decide the template name at runtime. However, Saxon has an extension instruction saxon:call-template to realize this feature.

You can realize this feature with FXSL library also.

--
Regards,
Mukul Gandhi

http://gandhimukul.tripod.com

Current Thread