title: To use a result tree fragment in a path expression, first convert it to a node-set using the msxsl:node-set() function
body: <p>I have following XSLT code:</p>
  
  <pre><code>&lt;xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:exslt="http://exslt.org/common"
    xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon"
    xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes"  xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath"
    xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings"
    xmlns:DesignetExtender ="urn:DesignetExtender"
    xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
    exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath 
    Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets DesignetExtender "&gt;
  </code></pre>
  
  <p>....</p>
  
  <pre><code>&lt;xsl:variable name="test"&gt;
  &lt;xsl:value-of select="exslt:node-set($HtmlPermulations)" disable-output-escaping="yes"/&gt;
  &lt;/xsl:variable&gt;
  </code></pre>
  
  <p>Value for HtmlPermulations is as follow:</p>
  
  <pre><code>&amp;lt;root&amp;gt;&amp;lt;item&amp;gt;Stationcar
                                          &amp;lt;/item&amp;gt;&amp;lt;item&amp;gt;Cabriolet
                                          &amp;lt;/item&amp;gt;&amp;lt;item&amp;gt;SUV&amp;lt;/item&amp;gt;&amp;lt;item&amp;gt;Stationcar
                                           Cabriolet&amp;lt;/item&amp;gt;&amp;lt;item&amp;gt;Stationcar
                                           SUV&amp;lt;/item&amp;gt;&amp;lt;item&amp;gt;Cabriolet
                                           SUV&amp;lt;/item&amp;gt;&amp;lt;item&amp;gt;Stationcar
                                           Cabriolet
                                           SUV&amp;lt;/item&amp;gt;&amp;lt;/root&amp;gt;
  </code></pre>
  
  <p>But when I am trying to use it in this for-each loop:</p>
  
  <pre><code>&lt;xsl:for-each select="$test/root/item"&gt;
   &lt;xsl:value-of select="."/&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>I am getting this error message:</p>
  
  <blockquote>
    <p>To use a result tree fragment in a path expression, first convert it
    to a node-set using the msxsl:node-set() function.</p>
  </blockquote>
  
  <p>Can anyone help?</p>