function-available

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

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

Arguments

 

$function

xs:string

The name of the requested function, as a lexical QName

Result

xs:boolean

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

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

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.

Arguments

 

$function

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

Links to W3C specifications

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

Applies to: XSLT 2.0 and later versions

XSLT 2.0 Specification

XSLT 2.1 Specification

Notes on the Saxon implementation

The function is fully implemented according to the W3C specifications.