title: xsl:for-each Getting the current() node attribute
body: <p>I have a question about xsl:for-each loop: </p>
  
  <p>I have something like </p>
  
  <pre><code>&lt;hodeName&gt;
      &lt;nodeChild name='name1'&gt;value&lt;/nodeChild&gt;
      &lt;nodeChild name='name2'&gt;value&lt;/nodeChild&gt;
      &lt;nodeChild name='name3'/&gt;
  &lt;/hodeName&gt;
  </code></pre>
  
  <p>I want to loop over them, name a variable with attribute name and assign it the value. 
  I'm struggling with something like </p>
  
  <pre><code>&lt;xsl:for-each select="/root/nodeName"&gt;
      &lt;json:string name="{current()/@name}"&gt;&lt;xsl:value-of select="current()" /&gt;&lt;/json:string&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>Which doesn't work. It is assigning however the correct xsl:value-of. </p>