function-lookup

function-lookup($function as xs:string, $arity as xs:integer) ➔ xs:boolean

Determines whether a function with a given name and arity is available in the context, and if so, returns a function item that can be used to call the function.

The function is useful to allow fallback action when a function is not available: for example, when calling an XPath 3.0 function, the code can be conditional on whether the 3.0 function is or is not available.

Arguments

 

$function

xs:string

The name of the requested function, as an xs:QName value

 

$arity

xs:integer

The arity of the requested function (number of arguments)

Result

xs:boolean

Links to W3C specifications

Namespace: http://www.w3.org/2005/xpath-functions

Applies to: XPath 3.0, XSLT 3.0, XQuery 3.0 (if enabled in Saxon: requires Saxon-PE or Saxon-EE)

XPath 3.0 Functions and Operators

Notes on the Saxon implementation

The function is fully implemented according to the W3C specifications.