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, 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=""/>

The equivalent in XQuery is:

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