The table below lists all the
plugin built-in
functions (in this namespace:
http://marklogic.com/extension/plugin
).
The Plugin API module contains functions that allow you to register plugins for use by MarkLogic Server.
The Plugin API is installed as the following file:
install_dir/Modules/MarkLogic/plugin/plugin.xqy
where install_dir
is the directory in which
MarkLogic Server is installed.
To use the plugin.xqy
module in your own XQuery modules,
include the following line in your XQuery prolog:
import module namespace plugin = "http://marklogic.com/extension/plugin"
at "/MarkLogic/plugin/plugin.xqy";
The library uses the plugin:
namespace, which is
not predefined in the server.
Function name | Description |
---|---|
plugin:asset | Returns the named asset, which must exist in the assets/ directory of the plugin, as stored in the Extensions database. |
plugin:asset-exists | Returns true if the named asset exists, otherwise returns false. |
plugin:capability | This function returns a function pointer implementing a given capability from a particular plugin. |
plugin:enumerate | This function enumerates functions implementing all capabilities supported by the given plugin. |
plugin:flush-scope | This function unloads all application plugins from a given scope. |
plugin:implementations | This function returns a map referencing all of the plugins that implement the specified capability. |
plugin:initialize-scope | This function ensures the availability of all plugins from a given scope. |
plugin:install-from-filesystem | This function installs a Library Module plugin from a fixed location on the filesystem (Assets/plugins/...) into the Extensions database. |
plugin:install-from-zip | Installs a Library Module plugin from a zip file provided as a parameter into the Extensions database. |
plugin:plugins | This function returns unique IDs of the registered plugins that have the specified capabilities. |
plugin:register | This function registers the capabilities map for use by MarkLogic Server. |
plugin:uninstall | This function removes a named plugin or set of plugins from the extensions database. |