SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
Conditions of Use
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
The XPath API
Saxon on .NET
Extensibility
Saxon Extensions
| Introduction
| EXSLT Extensions
| Extension attributes (XSLT only)
| Additional serialization parameters
» | Extension functions
| Extension instructions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# saxon:compile-stylesheet()

compile-stylesheet($stylesheet as document-node()) ==> jt:javax.xml.transform.Templates

This function takes as input a document containing an XSLT stylesheet, and produces as output a compiled stylesheet suitable for use with the saxon:transform() extension function.

The document node can be supplied as a call on the `doc()` function to read the stylesheet from filestore (or from a remote URL), or it can be a variable containing a stylesheet that has been constructed programmatically. If the document contains any `xsl:include` or `xsl:import` declarations these will be resolved in the usual way (relative to the base URI of the element that contains them).

Next