title: Select a node based on an ID-attribute from a value of another ref-attribute
body: <p>I have this pseudo-xml:</p>
  
  <pre><code>&lt;list&gt;
      &lt;entry id="1"&gt;
          &lt;item&gt;Item 1&lt;/item&gt;
          &lt;link ref="2"/&gt;
      &lt;/entry&gt;
      &lt;entry id="2"&gt;
          &lt;item&gt;Item 2&lt;/item&gt;
      &lt;/entry&gt;
  &lt;/list&gt;
  </code></pre>
  
  <p>I want to get the <code>&lt;item&gt;</code>-node in a template selected by an attribute:</p>
  
  <pre><code>&lt;xsl:template match="link"&gt;
      &lt;xsl:value-of select="/list/entry[@id=./@ref]/item"/&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>When I enter <code>/list/entry[@id='2']/item</code> manually, it works, but I need it kind of dynamic.
  When I debug it, <code>./@ref</code> (and also just <code>@ref</code>) are the right value of <code>2</code>.</p>
  
  <p>What do I miss here?</p>