|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Calling a template dynamically?
Hello everybody,
I'm trying to call a template whose name is in the XML file that I'm parsing.
Example:
XML file contains a tag like:
...
<label>sample</label>
...
And I want to call the template "sample".
Therefore I think that I would need to do something like:
<xsl:variable name="templatename">
<xsl:value-of select="label"/>
</xsl:variable>
<xsl:call-template name="$templatename">
but this doesn't work, as it doesn't the following:
<xsl:call-template name="{$templatename}">
Thank you very much for any help and best regards,
Costantino Sertorio
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








