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:transform
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0">
     
    <xsl:output method="html" indent="no"/>
    <xsl:template match="/"> 
        <html>
            <head>
                <meta http-equiv="Content-Type" content="text/html" />
                <script type="text/javascript" language="javascript"
                        src="../Saxonce/Saxonce.nocache.js"/>
                        
                <script>
                    var onSaxonLoad = function() {
                        Saxon.run( {
                             source:     location.href,
                             logLevel:   "SEVERE",
                             stylesheet: "sample.xsl"
                        });
                    }
                </script>
                
            </head>
            <!-- these elements are required also -->
            <body><p></p></body>
        </html>    
    </xsl:template>
    
</xsl:transform>

         

Next