XQuery/Registered Functions

Motivation
You want a list of all functions or all modules and their functions.

Method
There are two functions that we can use to get a list of functions in the current run-time system:

util:registered-functions

util:registered-functions($module)

The first function returns all registered functions, the second returns all registered functions for a given module.

List all registered functions
The following XQuery creates a list of all the XQuery functions in alphabetical order. The output will depend on the modules configured in the installation.

Run

Note that if there is no namespace prefix, the function is an XPath library function. (or the math module which also appears without a prefix ??)

Listing all functions by module
A more useful format would be to list functions by module:

Run

Sample Output: