title: pass an attribute of the context item to fn:id()
body: <p>I would like to clarify the following behavior.
  When using the <code>fn:id()</code> and passing the <code>@attribute</code> which is child of the context item, I get the empty sequence:</p>
  
  <pre><code>   &lt;xsl:template match="perfRes" mode="perfRes"&gt;    
              &lt;xsl:variable name="listItem" select="$lists//id(@attribute)"/&gt;
      &lt;xsl:template/&gt;
  </code></pre>
  
  <p>When passing the same attribute, but as a variable, the result is correct:</p>
  
  <pre><code>&lt;xsl:template match="perfRes" mode="perfRes"&gt;   
      &lt;xsl:variable name="attribute" select="@attribute"/&gt;    
      &lt;xsl:variable name="listItem" select="$lists//id($attribute)"/&gt;
  &lt;xsl:template/&gt;
  </code></pre>
  
  <p>So I suppose that in the first case this @attribute refers not to the context item but to something else, <strong>to what?</strong></p>
  
  <p>P.S. The value of $lists is a document-node().</p>