I have the following XSLT variable:
<xsl:variable name="superid" select="/contentdata/id"/>
Furthermore, I have a node with subnodes:
<nodes>
<node name="foo" id="bar" />
<node name="john" id="doe" />
<node name="jane" id="tarzan" />
</nodes>
Now, I'd like to check if a node with an id attribute that equals superid exists.
I've tried the following (which obviously doesn't work):
<xsl:if test="/nodes/node[@id = $superid]">Yes, Sir!</xsl:if>