fn:function-lookup

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 function is or is not available.

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

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

function(*)?

Namespace

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

Links to W3C specifications

XPath 3.0 Functions and Operators