J
Julien Phalip
Hi everyone!
I am trying to do a transformation from the xml file:
<foo>
<attribute>a</attribute>
...
</foo>
The xsl file is as follows:
<xsl:template name="foo">
<xsl:if test="attribute = 'a'">
<xsl:call-template name="a"/>
</xsl:if>
<xsl:if test="attribute = 'b'">
<xsl:call-template name="b"/>
</xsl:if>
<xsl:if test="attribute = 'c'">
<xsl:call-template name="c"/>
</xsl:if>
</xsl:template>
I would like to make the xsl file simpler with something like:
<xsl:template name="foo">
<xsl:call-template name="{./attribute}"/>
</xsl:template>
But I got an error saying: "Could not find template named: {./attribute}"
Can anyboby help me with that?
Thanks a lot!
Julien Phalip
I am trying to do a transformation from the xml file:
<foo>
<attribute>a</attribute>
...
</foo>
The xsl file is as follows:
<xsl:template name="foo">
<xsl:if test="attribute = 'a'">
<xsl:call-template name="a"/>
</xsl:if>
<xsl:if test="attribute = 'b'">
<xsl:call-template name="b"/>
</xsl:if>
<xsl:if test="attribute = 'c'">
<xsl:call-template name="c"/>
</xsl:if>
</xsl:template>
I would like to make the xsl file simpler with something like:
<xsl:template name="foo">
<xsl:call-template name="{./attribute}"/>
</xsl:template>
But I got an error saying: "Could not find template named: {./attribute}"
Can anyboby help me with that?
Thanks a lot!
Julien Phalip