title: XPath selecting a node with some attribute value equals to some other node's attribute value
body: <pre><code>&lt;grand id="grand"&gt;
    &lt;parent&gt;
      &lt;child age="18" id="#not-grand"/&gt;
      &lt;child age="20" id="#grand"/&gt; &lt;!-- This is what I want to locate --&gt;
    &lt;/parent&gt;
  &lt;/grand&gt;
  </code></pre>
  
  <p>Can anybody tell me how to express for locating the second child?</p>
  
  <p>This doesn't work...</p>
  
  <pre><code>"/grand/parent/child[@id=concat('#',/grand/@id)]/@age"
  </code></pre>
  
  <p>Thank you.</p>
  
  <hr>
  
  <p>I'm sorry. The expression is OK. I found I got some problems in other area not the expression itself.</p>