title: SaxonJS on Node.js
body: <p>I'm trying to run an empty simple code snippet to test SaxonJS 1.1.0 on NodeJs v8.11.1 on Windows 10.</p>
  
  <pre><code>require('./Saxon-JS-1.1.0/SaxonJS.js');
  </code></pre>
  
  <p>But I got this error :</p>
  
  <pre><code>PS C:\XXX\sandbox\xsl-transformation&gt; node main.js
  C:\XXX\xsl-transformation\Saxon-JS-1.1.0\SaxonJS.js:17136
          setPlatform(JSTestDriver.platform);
                      ^
  ReferenceError: JSTestDriver is not defined
  at initialize (C:\XXX\sandbox\xsl-transformation\Saxon-JS-1.1.0\SaxonJS.js:17136:25)
  </code></pre>
  
  <p>Looking at the source code, I can see :</p>
  
  <pre><code>function initialize() {
      "use strict";
      if (inBrowser) {
          setPlatform(BrowserPlatform.platform);
          saxonPrint("Saxon-JS " + getProcessorInfo().productVersion + " in browser", 0);
      } else {
          // Currently only Nashorn. (Later need to distinguish from Node case)
          // Nashorn JSTestDriver
          setPlatform(JSTestDriver.platform);
          saxonPrint("Saxon-JS " + getProcessorInfo().productVersion + " in 
     Nashorn");
  
          // node NodePlatform
      }
  
      if (typeof platform.initialize === "function") {
          platform.initialize();
      }
  }
  </code></pre>
  
  <p>It seems Node Platform is not implemented.</p>
  
  <p>However, in the <a href="http://www.saxonica.com/saxon-js/documentation/index.html" rel="nofollow noreferrer">documentation</a>, it is written :</p>
  
  <blockquote>
    <p>We're talking here primarily about running Saxon-JS in the browser.
    However, it's also capable of running in server-side JavaScript
    environments such as Node.js (not yet fully supported in this
    release).</p>
  </blockquote>
  
  <p>I deeply search a code snippet of SaxonJS/NodeJS but I did not find one.
  Has anyone a snippet code of SaxonJS working on NodeJS ?</p>