Calling named templates with a variable

Subject: Calling named templates with a variable
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Fri, 25 Jun 1999 16:32:46 -0600
I want to call a named template.
I don't know what its name is, but I can put the name in a variable.

<xsl:variable name="foo" expr="'SomeTemplateName'"/>
<xsl:call-template name="$foo"/>

With this, XT complains that no template is named "$foo".
Same if I use "{$foo}".

The spec does not say anything one way or the other on this issue.

What's the reason why a variable reference is not allowed here?
Is it because a variable's value can can be a node set?
Is it because we want people to be able to put '$' in the name of a

 XSL-List info and archive:

Current Thread