This section describes the extensions and implementation-defined features provided with the Saxon product.
If you want to implement your own extensions, see Extensibility.
The extensions described here were provided because there are things that are difficult to achieve, or inefficient, using standard XSLT/XQuery facilities alone. In some cases they are retained from earlier releases even though equivalent functionality is available using the standard language. 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
xmlns:saxon="http://saxon.sf.net/" to appear. In XSLT this is typically declared
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
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". This does not apply,
however, if you are only using extension functions.
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, see Saxon SQL Extension.