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

variable select on xsl:apply-templates

Subject: variable select on xsl:apply-templates
From: avi paradise <aparadise@xxxxxxxxxxxx>
Date: Sat, 12 Apr 2003 07:40:34 -0400
xsl apply templates select variable
In general I am trying to create a call-able, generic template for a
deep, static, surrounding structure with variable content.
It looks something like this:
<xsl:template name="FormLayout">
      <xsl:param name="action"/>
      <xsl:param name="formName"/>
      <xsl:param name="formCallBack"/>

       <!--Complicated many layered structure-->
              <xsl:apply-templates>
                     <xsl:value-of select="$formCallBack"/>
               </xsl:apply-templates>
       </!--Complicated many layered structure-->
</xsl:template>

I am getting different behavior from 2 different xslt processors (MS and XT).
XT accepts the code and MS posits an unexpected child error.

In both processors if I attempt to evaluate the variable as part of
<xsl:apply-templates select="$formCallBack"/>, it fails.

However XT will accept the following:
<xsl:apply-templates>
     <xsl:value-of select="$formCallBack"/>
 </xsl:apply-templates>
(it accepts it as long as $formCallBack is a simple, top level xpath reference)


Is this code permissible?
Is this a case where I need to evaluate the argument in the select?
Is there a better solution?

Thanks for any help,
ap




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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.