title: Iterate over nodes with XSLT and get attributes value
body: <p>I have an XML file with a structure like below:</p>
  
  <pre><code>&lt;entries&gt;
    &lt;entry&gt;
      &lt;sense&gt;
        &lt;definition&gt;
          &lt;RegDef&gt;
             &lt;w ID="1"&gt;word1&lt;/w&gt;&lt;w ID="2"&gt;word2&lt;/w&gt;
          &lt;/RegDef&gt;
       &lt;/definition&gt;
      &lt;/sense&gt;
     &lt;/entry&gt;
    &lt;entry&gt;
      &lt;sense&gt;
        &lt;definition&gt;
          &lt;RegDef&gt;
             &lt;w ID="12"&gt;word3&lt;/w&gt;&lt;w ID="43"&gt;word4&lt;/w&gt;&lt;w ID="413"&gt;word5&lt;/w&gt;
          &lt;/RegDef&gt;
       &lt;/definition&gt;
      &lt;/sense&gt;
     &lt;/entry&gt;
  .
  .
  .
  &lt;/entries&gt;
  </code></pre>
  
  <p>I want to iterate over each  node and get the value of attribute ID and display it like a hyperlink.</p>
  
  <p>I tried</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
   &lt;xsl:output omit-xml-declaration="yes" indent="yes"/&gt;
   &lt;xsl:template match="entries/entry"&gt;
    &lt;html&gt;
     &lt;a href="{concat('http://example.com/show.php?id=', entries/entry/list/sense/definition/w[@ID='0'])}"&gt;word&lt;/a&gt;
    &lt;/html&gt;
   &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>But it doesn't get me any ID. I want the value of each attribute ID to concatenate it at the url, and then put in the  tag the word that has the attribute concatenated at the url.</p>
  
  <p>I want the output to be : the values <a href="http://example.com/show.php?id=1" rel="nofollow">word1</a>   and <a href="http://example.com/show.php?id=2" rel="nofollow">word2</a> like hyperlink, and I want each hyperlink to have the attribute the same with the attribute on the node word1 and word2</p>