XSLT20Processor
The XSLT20Processor object provides the various functions used to perform an XSLT 2.0 transform. This section describes all the available functions, but the following (along with the object constructor) are probably going to be used most often:
1. Configure: |
setParameter |
setInitialTemplate |
setMode |
2. Transform: |
updateHTMLDocument |
transformToDocument |
transformToFragment |
When using the API on page-load, you should ensure Saxon-CE is loaded
first by including your code within the global onSaxonLoad
function. This function is called as soon as the HTML page has loaded and
Saxon-CE has been initialized.
XSLT20Processor instances are created using the newXSLT20Processor factory method of the static Saxon object (which also provides a set of XML utility functions along with functions for controlling error logging).
Functions
Function |
Description |
Removes all parameters set for the XSLT20Processor instance. |
|
Gets the initial mode set for the XSLT transform. |
|
Gets the name set for the XSLT transform initial template |
|
Gets the value of the named XSLT transform parameter. |
|
Returns a result document created by the xsl:result-document instruction |
|
Returns any array of result document URIs that were output by the previous XSLT transform. |
|
Returns the callback function set by setSuccess |
|
Sets the stylesheet to be used for an XSLT transform |
|
Removes the named parameter. |
|
Resets the XSLT20Processor object to its original state. |
|
Set the base URI for resolving output URIs from an XSLT transform |
|
Sets the name for the initial mode to be called for the XSLT transform |
|
Sets the name for the initial template to be called for the XSLT transform |
|
Sets named parameters for the XSLT transform |
|
Following a transform, a callback is made to this function |
|
Returns the result of an XSLT transform as a Document object. |
|
Returns the result of an XSLT transform as a DocumentFragment object. |
|
Returns the result of an XSLT transform as one or more HTML DocumentFragment objects. |
|
Initiates an XSLT transform on an existing HTML document. |