I am trying to get xpath of xsl variable using xsl ver 1.0. This is my variable:
<xsl:variable name ="myVar">
<RefData RefTag="test1" bbb="false" />
<RefData RefTag="test2" bbb="false" />
<RefData RefTag="test3" bbb="false" />
<RefData RefTag="test4" bbb="true" />
<RefData RefTag="test5" bbb="false" />
<RefData RefTag="test6" bbb="false" />
</xsl:variable>
I am trying to get the value of the bbb attribute using the value of RefTag:
<xsl:if test="$myVar/RefData[@RefTag = 'test3']/@bbb">
this does not work.
VS XSL Debugger returns an error: "To use a fragment of the resulting tree in the path expression, first convert it to node-set using the msxsl: node -set () function.
I do not understand how to use the msxsl: node -set () function, and in any case, I prefer not to use msxsl namesapce.
Can anyone help here?
source
share