title: Convert string to node-set
body: <p>In my xsl file,
  I am receiving a separate xml document (beside the main xml document 
  that I’m transforming) as a string parameter (param)</p>
  
  <p>say my param name is seconddoc </p>
  
  <pre><code>&lt;xsl:param name="seconddoc"&gt;&lt;/xsl:param&gt;
  </code></pre>
  
  <p>and the param value is following (again, i'm getting the whole thing as a string)</p>
  
  <pre><code>&lt;products&gt;
      &lt;product&gt;
          &lt;id&gt;1&lt;/id&gt;
          &lt;name&gt;pro-1&lt;/name&gt;
      &lt;/product&gt;
      &lt;product&gt;
          &lt;id&gt;2&lt;/id&gt;
          &lt;name&gt;pro-2&lt;/name&gt;
      &lt;/product&gt;
      &lt;product&gt;
          &lt;id&gt;3&lt;/id&gt;
          &lt;name&gt;pro-3&lt;/name&gt;
      &lt;/product&gt;
  &lt;/products&gt;
  </code></pre>
  
  <p>I can print the entire string as following</p>
  
  <pre><code>&lt;xsl:value-of select="$seconddoc" /&gt;
  </code></pre>
  
  <p>But I want iterate the data (string) instead of getting entire value at once.
  my end goal is to load this data to a select option.</p>
  
  <p>I tired like this:</p>
  
  <pre><code>&lt;select&gt;
      &lt;xsl:for-each select="$seconddoc/products/product"&gt;
          &lt;option value="{id}"&gt;
              &lt;xsl:value-of select="name" /&gt;&lt;/option&gt;
      &lt;/xsl:for-each&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>but I'm getting TransformerException. "Invalid conversion from 'java.lang.String' to 'node-set'.</p>
  
  <p>update:</p>
  
  <p>This is what I have in my jsp page</p>
  
  <pre><code>&lt;x:transform xml="${mainxmldoc}" xslt="${xslt}"&gt;
  &lt;x:param name="seconddoc" value="&lt;%=xmlString %&gt;"/&gt;
  &lt;/x:transform&gt;
  </code></pre>