saxonica.com

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 http://saxon.sf.net/.

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)

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.

Next