13. Compiling XSL to SEF (2/3)

You can find all the details in Exporting stylesheets for SaxonJS on Saxonica.com.

  1. -xsl tells the compiler where to find the XSL file.

  2. -export tells the compiler where to write the SEF.

    (You are strongly encouraged to name your SEF files with the extension .sef.json. If they don’t end with .json, you will have to make sure that your web server serves them with the content-type “application/json” or the browser may not load them properly.)

  3. -target:JS tells the compiler you’re compiling for JavaScript.

  4. -nogo tells the compiler not to attempt to execute the transformation after compiling it.

  5. -relocate:on determines whether the static base URI of the stylesheet reflects where the original was compiled (off) or where the SEF file resides (on).

  6. -ns:##html5 declares that unprefixed element names will match in either no namespace or the HTML namespace. This allows SaxonJS to more closely emulate the special rules associated with the HTML5 DOM.