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 Extensions

This section describes the extensions and implementation-defined features provided with the Saxon product.

If you want to implement your own extensions, see Extensibility.

These extensions have been provided because there are things that are difficult to achieve, or inefficient, using standard XSLT/XQuery facilities alone. As always, it is best to stick to the standard if you possibly can: and most things are possible, even if it's not obvious at first sight.

All Saxon extensions require a namespace declaration such `xmlns:saxon="http://saxon.sf.net/"` to appear. In XSLT this is typically declared on the `xsl:stylesheet` element; it is also useful to write `exclude-result-prefixes="saxon"` to prevent the Saxon namespace appearing in the result tree. In XQuery the namespace is declared by writing `declare namespace saxon="http://saxon.sf.net/";` in the Query prolog.

If you use XSLT extension instructions such as `saxon:doctype`, it is also necessary to include the attribute `extension-element-prefixes="saxon"`.

Before using a Saxon extension, check whether there is an equivalent EXSLT extension available. EXSLT extensions are more likely to be portable across XSLT processors.

For details of additional extensions available in Query only, see Query Extensions.

Saxon also provides a set of extension elements providing access to SQL databases. These are described here.

Next