Saxonica: XSLT and XQuery Processing: run

run

run($cmd as Command?) → XSLT20Processor

Uses JavaScript literal object properties to execute an XSLT transform.

Arguments

 

$cmd

Command?

The URI of the stylesheet.

Result

XSLT20Processor

Details

A call to this function uses a single Command object parameter to describe the XSLT transform to run. The Command object is designed to be used as JavaScript literal:

            
var onSaxonLoad = function() {

    var xrows = document.getElementById("extra").getElementsByTagName("tr");

    Saxon.run( {
         stylesheet:   "display-geo.xsl",
         source:       "geo-files.xml"
         
         parameters: {
                        mass: 225,
                        rows: xrows,
                        title: "Intro"
                     },   
    });
}

         

This function returns a newly created XSLT20Processor object. Use this object's getResultDocument and getResultDocuments functions to get any output results from the tranform. Note that the principal output document is returned by a call to getResultDocumemt with no parameter value.

The run method serves as a wrapper for the 3 lower-level transform calls of the API: transformToDocument, transformToFragment and updateHTMLDocument. The latter of these is the default function, use the method property with the function name to specify an alternative transform.

Next