[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Pass node to template
De : Karl J. Stubsjoen [mailto:karl@xxxxxxxxxxxxx] > Hello, Hi. > <xsl:variable name="EDITPROP" select="EDITPROPS"/> Here the variable EDITPROP is a reference to the nodeset matching the XPath expression in the select (EDITPROPS). > <xsl:call-template name="MAKE_INPUT_BOX"> > <xsl:with-param name="nodEdit"><xsl:value-of > select="$EDITPROP" /></xsl:with-param> Here nodEdit is not a nodeset, but a tree fragment. That is, the parameter is the bit of a tree between the end of the <xsl:variable> and the start of the </xsl:variable> > </xsl:call-template> > > Here is the beginning part of my template that fails: > <xsl:template name="MAKE_INPUT_BOX"> > <xsl:value-of select="$nodEdit/@type"/> You can't do tree operations on a result fragment. What you want is to actually pass the nodeset into the template. To do that, change the with-param to <xsl:with-param name="nodEdit" select="$EDITPROP" /> Now, the parameter type in the template is the type of the expression "$EDITPROP", which presumably is a nodeset. Cheers, Dave. 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
|