Saxon extension functions

These functions are listed and fully described, along with functions in the core library, in the Function Library.

The names of these functions are in the Saxon namespace http://saxon.sf.net/, conventionally prefixed saxon.

You can use these functions simply by reference; you do not need to declare them or import them in any way. (Saxon makes no use of the declare function ... external; declaration in XQuery.)

For example, to invoke the saxon:evaluate() function in XSLT, write:

<xsl:variable name="expression" select="concat('child::', $param, '[', $index, ']')"/> .. <xsl:copy-of select="saxon:evaluate($expression)" xmlns:saxon="http://saxon.sf.net/"/>

The equivalent in XQuery is:

declare namespace saxon="http://saxon.sf.net/"; declare variable $param as xs:string external; declare variable $index as xs:integer external; declare variable $expression := concat('child::', $param, '[', $index, ']'); saxon:evaluate($expression)

Saxon extension functions are not as stable as functions in the core library. Many of them are retained over a long sequence of releases, but on occasions they are superseded by functions appearing in a standardized or portable library, and when this happens the Saxon version will eventually be dropped. There is a long tradition of functions that were first pioneered in Saxon eventually finding their way (typically in modified form) into a public standard.