Extension functions in the Saxon namespace

These functions are listed and fully described, along with functions in the core library, in the function library chapter.

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

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)

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.

These extension functions are available in Saxon-PE and Saxon-EE except where otherwise stated. They are not available in Saxon-HE.

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.