Subject: RE: [xsl] Pass node to template From: "Michael Kay" <mhk@xxxxxxxxx> Date: Tue, 20 May 2003 20:41:08 +0100 |
<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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Pass node to template, David Carlisle | Thread | Re: [xsl] Pass node to template, Karl J. Stubsjoen |
[xsl] combining multiple xml files, RJ P | Date | RE: [xsl] XSLT 2.0 and external par, Michael Kay |
Month |