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