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

RE: Pass node to template

Subject: RE: Pass node to template
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 20 May 2003 20:41:08 +0100
xsl call template pass node
<xsl:value-of> extracts the string value of a node; you want to pass the
node itself.

Instead of

<xsl:with-param name="nodEdit"><xsl:value-of select="$EDITPROP"
/></xsl:with-param>

you want

<xsl:with-param name="nodEdit" select="$EDITPROP" />

Michael Kay


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Karl J. Stubsjoen
> Sent: 20 May 2003 16:30
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Pass node to template
> 
> 
> Hello,
> 
> I am having difficulties passing a node to a named template.  
> Similar tests on the node (as a variable) work fine inline 
> where it was created.  However, trying to pass it to a named 
> template and then performing identical steps yields the error:
> 
> msxml4.dll error '80004005'
> Reference to variable or parameter 'nodEdit' must evaluate to 
> a node list.
> 
> Here is where I set my node variable:
> 
>     <xsl:variable name="EDITPROP" select="EDITPROPS"/>
>     <xsl:value-of select="$EDITPROP/@type"/>
> 
>     <!-- (notice the value-of, it my test and it works perfect) -->
> 
> 
> Here is my call ($EDITPROP is the node):
> 
>              <xsl:call-template name="MAKE_INPUT_BOX">
>                 <xsl:with-param 
> name="input_name"><xsl:value-of select="$innerFLD"/></xsl:with-param>
>                 <xsl:with-param 
> name="input_value"><xsl:value-of select="$currentVAL" 
> /></xsl:with-param>
>                 <xsl:with-param name="nodEdit"><xsl:value-of 
> select="$EDITPROP" /></xsl:with-param>
>                 </xsl:call-template>
> 
> Here is the beginning part of my template that fails: 
> <xsl:template name="MAKE_INPUT_BOX"> <xsl:param 
> name="input_name"/> <xsl:param name="input_value"/> 
> <xsl:param name="nodEdit"/>
> 
>     <xsl:value-of select="$nodEdit/@type"/>
> 
>     <!-- (this value-of causes an error) -->
> 
> So what am I doing wrong?
> Thanks for the help.
> Karl
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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.