Subject: [xsl] passing template names From: Karl <call14@xxxxxxxxx> Date: Fri, 7 Jul 2006 12:05:11 +0100 (BST) |
I am in a situation where in a particular section need to call different template dynamically based on which template invokes it. Though I can use <xsl:choose> or <xsl:if> to do that, i wish i pass the template name as a param value. e.g. <xsl:call-template name="A"> <xsl:with-param name="TemplateName">xx_template</xsl:with-param> </xsl:apply-templates> ... <xsl:call-template name="A"> <xsl:with-param name="TemplateName">yy_template</xsl:with-param> </xsl:apply-templates> and then <xsl:template name="A"> <xsl:param name="TemplateName"/> .... <xsl:call-template name="{$TemplateName}"/> .. </xsl:template> I doesnt work. Is it valid? If not, are there any better method to achieve similar result. Currently, iam passing numbers in param and use <xsl:choose> to call different templates . Thanks karl ___________________________________________________________ All New Yahoo! Mail Tired of Vi@gr@! come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT to remove characters, Wendell Piez | Thread | Re: [xsl] passing template names, Mukul Gandhi |
[xsl] XSLT to remove characters and, Georg Hohmann | Date | Re: [xsl] passing template names, Mukul Gandhi |
Month |