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