Saxonica.com

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.

Further information:

Next