
MarkLogic 10 Product Documentation
fn:function-availablefn:function-available(
   $function-name as xs:string,
   [$arity as xs:integer]
) as xs:boolean
Summary
  Returns true if and only if there is an XQuery or XSLT 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 and XQuery 1.0-ml.
	  
	  
	
	  
	    | 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
xquery version "1.0-ml";
fn:function-available("fn:doc")
=>
true
    Copyright © 2025 MarkLogic Corporation. MARKLOGIC is a
    registered trademark of MarkLogic Corporation.