Saxonica: XSLT and XQuery Processing: The Processing-Instruction's Boot Stylesheet

The Processing-Instruction's Boot Stylesheet

The Processing Instruction:

<?xml-stylesheet type="text/xsl" href="sample.boot.xsl"?>

This XSLT 1.0 stylesheet is run from a <?xml-stylesheet?> processing-instruction. When the skeleton HTML page loads in the browser, Saxon-CE is run (using JavaScript), this then executes an XSLT 2.0 transform on the 'host' XML document using a stylesheet (sample.xsl) set with the stylesheet property.


    <xsl:output method="html" indent="no"/>
    <xsl:template match="/"> 
                <meta http-equiv="Content-Type" content="text/html" />
                <script type="text/javascript" language="javascript"
                    var onSaxonLoad = function() {
                             source:     location.href,
                             logLevel:   "SEVERE",
                             stylesheet: "sample.xsl"
            <!-- these elements are required also -->