Subject: xsl:call-template question From: Joni Fazo <joni@xxxxxxxxxxx> Date: Wed, 16 Feb 2000 11:36:38 -0800 |
Hello,
Is it possible to call a template and pass in as a parameter the name of the template you would like the called template to call?
Here's a (non-working) example of what I am trying to do:
<!-- / Template -->
<xsl:template match="/">
<HTML>
<xsl:call-template name="buildpage">
<xsl:with-param name="nexttemplate">buildbody</xsl:with-param>
</xsl:call-template>
</HTML>
</xsl:template>
<!-- buildpage Template -->
<xsl:template name="buildpage">
<xsl:param name="nexttemplate">defaulttemplate</xsl:param>
<xsl:value-of select="$nexttemplate"/>
<xsl:call-template name="{$nexttemplate}"/>
</xsl:template>
<!-- buildbody Template -->
<xsl:template name="buildbody">
<BODY>
</BODY>
</xsl:template>
I get the error "No named template "{$nexttemplate}" found" when the line
<xsl:call-template name="{$nexttemplate}"/>
is processed. I am able to get the value of $nexttemplate though...
Thanks in advance for any help you can give me.
Joni
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: The XSL-List Digest V2 #510, Respess, Christe | Thread | Re: xsl:call-template question, Tony Graham |
RE: JavaScript, Duane Nickull | Date | Do not quote entire XSL-List posts, XSL-List Owner |
Month |