Extension functions

This section describes extension functions built in to the Saxon product. For information on writing your own extension functions, see Writing extension functions (Java) or Writing extension functions (.NET)

A Saxon extension function is invoked using a name such as saxon:localname().

The saxon prefix (or whatever prefix you choose to use) must be associated with the Saxon namespace URI

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)"

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, ']');

The extension functions supplied with the Saxon product are as follows:

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