Loading TOC...

fn.functionAvailable

fn.functionAvailable(
   $function-name as String,
   [$arity as Number]
) as Boolean

Summary

Returns true if and only if there is a function whose name and optionally arity matches the value of the $function-name and the optional $arity arguments. This is an XSLT function, and it is available in both XSLT, XQuery 1.0-ml, and JavaScript.

Parameters
$function-name The $function-name is a string containing a lexical QName. It may be a name of a builtin-type, type imported using xsl:import-schema, or an extension type. This parameter is mandatory. The lexical QName is expanded using the namespace declarations in scope for the expression. If the lexical QName is unprefixed, then the standard function namespace is used in the expanded QName.
$arity If $arity parameter is present, then the function returns true if and only if the function specified by the first argument has a signature that takes $arity number of arguments.

Example

fn.functionAvailable("fn:doc")
=>
true

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy