xsl-list
[Top] [All Lists]

Re: combining two variables to generate XPATH

2002-12-17 13:09:40
bix xslt wrote:
Please note I made a slight correction. the $node that appears within the foreach statment just under the branch variable assignment should be $branch instead. This does not solve my problem - this is the original problem. Thanks.


From: "bix xslt" <bix_xslt(_at_)hotmail(_dot_)com>
<xsl:variable name="branch" select="concat($node,'/',$type,'/item')" />
       <xsl:value-of select="$branch" />
<!--        <xsl:for-each select="$node">


becomes

<xsl:variable name="branch" select="concat($node,'/',$type,'/item')" />
       <xsl:value-of select="$branch" />
<!--        <xsl:for-each select="$branch">


You are trying to create your select attribute by concatenating strings at execution time. This is not legal XSLT. You have created a string this way, but select needs to be an XPath expression that produces a nodeset. Look into processors that support the evaluate() extension function, and see if that helps.


--
--------------------------
Jeff Kenton
DataPower Technology, Inc.



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