title: create a javascript document Object
body: <p>Is there any way to create or recreate a javascript document Object by calling a function.  Something like</p>
  
  <pre><code>&lt;script type="javascript/text"&gt;
    var document = createDocument("some html");
  &lt;/script&gt;
  </code></pre>
  
  <p>I want to do this so I can solve the issue in this question <a href="https://stackoverflow.com/questions/1051529?sort=votes#sort-top">client side xslt with javascript in firefox</a></p>