xsl-list
[Top] [All Lists]

(unknown)

2003-04-05 13:16:41


      <xsl:call-template name="$test"/>

XSLt like C and most other compiled programming languages doesn;t allow
functions (templates) to be called based on a dynamically constructed
name.

you can do
<xsl:choose>
<xsl:when test="$test='a'"><xsl:call-template name="a"/></xsl:when>
<xsl:when test="$test='b'"><xsl:call-template name="b"/></xsl:when>
...


or often better don't have multiple templates, just have one, and pass
in teh variable as a parameter to the template so the template can take
different actions depending on its value.

David


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>