title: How to use XSLT attribute with for each select
body: <p>I want to use a attribute inside select keyword.</p>
  
  <p>Here is my xml</p>
  
  <pre><code>&lt;root rowselement="root/a/b"&gt;
  &lt;a&gt;
      &lt;b var="target1"/&gt;
  &lt;/a&gt;
  &lt;a&gt;
      &lt;b var="target2"/&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p></p>
  
  <p>and xslt</p>
  
  <pre><code>&lt;xsl:for-each select="/root/@rowselement"&gt;
  &lt;xsl:value-of select="@var"/&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>and expected output</p>
  
  <blockquote>
    <p>target1
    target2</p>
  </blockquote>
  
  <p>but it doesn't work , what can i do?</p>