[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

calling template with name passed in a variable

Subject: calling template with name passed in a variable
From: Piotr Dobrogost <pd@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Dec 2009 01:07:07 +0100
 calling template with name passed in a variable

Can I call a template passing its name dynamically (by means of select or variable)?

I'd like to do something like this

<xsl:template name="MyTypeX">

<xsl:template name="MyTypeY">

<xsl:param name="InPlaceTypesList" as="element()*">

<xsl:template match="xsd:element[@type=$InPlaceTypesList]">
  <xsl:call-template name="@type"/> // <-- error line

Error at xsl:call-template on line 135 column 38 of xsd2perl.xsl:
  XTSE0020: Invalid QName {@type}

Regards Piotr Dobrogost

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.