Extension functions

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, write:

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

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

The Java source code of these functions (which in most cases is extremely simple), can be used as an example for writing other user extension functions. It is found in class net.sf.saxon.functions.Extensions. Source code is available in the download of Saxon-B from SourceForge

Expand

Next