title: XSLT - Iterate through node-set
body: <p>I have a xml like this:</p>
  
  <pre><code>&lt;root&gt;
  &lt;row&gt;
      &lt;col name="col1"&gt;&amp;lt;root&amp;gt;&amp;lt;row&amp;gt;&amp;lt;col name=&amp;quot;COL_NAME_1&amp;quot;&amp;gt;col_value_1&amp;lt;/col&amp;gt;;&amp;lt;/row&amp;gt;&amp;lt;/root&amp;gt;&lt;/col&gt;
      &lt;col name="col2"&gt;&amp;lt;root&amp;gt;&amp;lt;row&amp;gt;&amp;lt;col name=&amp;quot;COL_NAME_2&amp;quot;&amp;gt;col_value_2&amp;lt;/col&amp;gt;;&amp;lt;/row&amp;gt;&amp;lt;/root&amp;gt;&lt;/col&gt;
  &lt;/row&gt;&lt;/root&gt;
  </code></pre>
  
  <p>I need to get escaped collection from col1 and iterate through its rows.
  I'm using exsl:node-set function. Here is my simplified xsl:</p>
  
  <pre><code>&lt;xsl:template match="/"&gt;
  &lt;xsl:variable name="collection" select="exsl:node-set(./root/row/col[@name='col1'])" disable-output-escaping="yes" /&gt;
  &lt;xsl:for-each select="($collection)/root/row"&gt;
      &lt;!-- ... --&gt;
  &lt;/xsl:for-each&gt;&lt;/xsl:template&gt;
  </code></pre>
  
  <p>I can correctly read value from variable $collection using xsl:value-of function but i can't iterate over it as if there were no rows. Any ideas what am I doing wrong?</p>