title: XPath relative path in expression
body: <p>I am in 'group' node. From it, I want to find such 'item' node, that has 'id' attribute equals to current's 'group' node 'ref_item_id' attribute value. So in my case, by being in 'group' node B, I want 'item' node A as output. This works:</p>
  
  <pre><code>&lt;xsl:value-of select="preceding-sibling::item[@id='1']/@description"/&gt;
  </code></pre>
  
  <p>But this doesn't (gives nothing):</p>
  
  <pre><code>&lt;xsl:value-of select="preceding-sibling::item[@id=@ref_item_id]/@description"/&gt;
  </code></pre>
  
  <p>When I type:</p>
  
  <pre><code>&lt;xsl:value-of select="@ref_item_id"/&gt;
  </code></pre>
  
  <p>I have '1' as result. So this attribute is for sure accessible, but I can't find path to it from XPath expression above. I tried many '../' combinations, but couldn't get it work.</p>
  
  <p>Code to test: <a href="http://www.xmlplayground.com/7l42fo" rel="nofollow">http://www.xmlplayground.com/7l42fo</a></p>
  
  <p>Full XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;root&gt;
      &lt;item description="A" id="1"/&gt;
      &lt;item description="C" id="2"/&gt;
      &lt;group description="B" ref_item_id="1"/&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>Full XSLT:</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  
  &lt;xsl:output method="text" indent="no"/&gt;
    &lt;xsl:template match="root"&gt;
       &lt;xsl:for-each select="group"&gt;
          &lt;xsl:value-of select="preceding-sibling::item[@id=@ref_item_id]/@description"/&gt;
       &lt;/xsl:for-each&gt;
    &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>