fn:function-available

function-available($function-name as xs:string) ➔ xs:boolean

Determines whether a function with a given name (regardless of arity) is available in the context.

Arguments

 

$function-name

xs:string

The name of the requested function, as a lexical QName

Result

xs:boolean

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

Determines whether a function with the given name and arity is available in the context.

Arguments

 

$function-name

xs:string

The name of the requested function, as a lexical QName

 

$arity

xs:integer

The arity of the requested function (number of arguments)

Result

xs:boolean

Namespace

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

Links to W3C specifications

XSLT 2.0 Specification

XSLT 3.0 Specification

Notes on the Saxon implementation

XPath 3.0 introduces the function function-lookup(), which returns null in cases where function-available() would return false, but actually provides access to the function in cases where function-available() would return true.

See also:

fn:function-lookup()