xdmp functions (MarkLogic Server)

The MarkLogic Server extension functions are XQuery extensions that return MarkLogic Server-specific information, such as the version of MarkLogic Server, the IDs of the hosts in the cluster, and so on.

65 functions
Function nameDescription
xdmp:access Returns whether a given action on the specified document URI would succeed.
xdmp:architecture Returns the hardware architecture upon which MarkLogic Server is running.
xdmp:binary-is-external Test whether or not a binary node represents an external binary.
xdmp:binary-is-large Check whether a binary node is a large binary.
xdmp:binary-is-small Check whether a binary node is a small binary.
xdmp:binary-size Returns the size of the data, in bytes, represented by a binary node.
xdmp:cluster Returns the the ID of the cluster named in the parameter.
xdmp:cluster-name Returns the the name of the cluster with the specified ID.
xdmp:collation-canonical-uri Returns the canonical URI for the given URI, if it represents a valid collation.
xdmp:configuration-timestamp Returns timestamp of last configuration changed .
xdmp:database Returns the the ID of the database named in the the parameter.
xdmp:database-forests Returns a sequence of forest IDs in the specified database.
xdmp:database-global-nonblocking-timestamp Returns the most recent commit timestamp for which a query on the database including its foreign database will not block waiting for transactions to commit or journal frames to arrive from a foreign master.
xdmp:database-is-replica Tests if a database is a replica of a foreign database.
xdmp:database-name Return the name of the database with the given ID.
xdmp:database-nonblocking-timestamp Returns the most recent commit timestamp for which a query on the database will not block waiting for transactions to commit or journal frames to arrive from a foreign master.
xdmp:databases Returns a sequence of the IDs of all the databases in the system.
xdmp:document-forest Returns the forest ID of the forest in which a document (or a lock or a property) with the specified URI is stored.
xdmp:document-get Returns the document in the file specified by $location.
xdmp:document-timestamp Returns timestamp of the most recent visible update to a document, lock, or property.
xdmp:elapsed-time Returns the elapsed time since the start of processing of this query.
xdmp:external-binary Returns an external binary node.
xdmp:external-binary-path Return the path to the external file associated with an external binary document.
xdmp:foreign-clusters Returns the the IDs of the foreign clusters.
xdmp:forest Returns the the ID of the forest specified as the parameter.
xdmp:forest-databases Returns the database ID corresponding to the database to which the specified forest belongs.
xdmp:forest-host Return the host of the forest with the given id.
xdmp:forest-name Return the name of the forest with the given id.
xdmp:forest-updates-allowed Return updates allowed state of the forest with the given ID.
xdmp:forests Returns a sequence of the IDs of all the forests in the system.
xdmp:get [DEPRECATED: use xdmp:document-get instead] Returns the document in the XML file specified by $path.
xdmp:get-orphaned-binaries Returns a sequence of the IDs of all orphaned large binaries in a given forest.
xdmp:group Returns the the ID of the group specified in the parameter.
xdmp:group-hosts Returns the IDs of all hosts belonging to the group with the given ID.
xdmp:group-name Returns the the name of the group with the given ID.
xdmp:group-servers Returns the the IDs of all App Servers belonging to the group with the given ID.
xdmp:groups Returns a sequence of the IDs of all the groups in the system.
xdmp:host Returns the the ID of the host named in the parameter.
xdmp:host-forests Returns a sequence of forest IDs in the specified host.
xdmp:host-name Returns the the name of the host ID specified as the parameter.
xdmp:hosts Returns a sequence of the IDs of all the hosts in the system.
xdmp:log Logs a debug message to the log file <install_dir>/Logs/ErrorLog.txt.
xdmp:log-level Retrieves the current server log level.
xdmp:modules-database Returns the database ID of the modules database.
xdmp:modules-root Returns the current root path for modules.
xdmp:platform Returns the operating-system platform upon which MarkLogic Server is running ("solaris", "winnt", "linux", or "macosx").
xdmp:pretty-print Returns a well-formatted XQuery module.
xdmp:product-edition Returns the current MarkLogic product edition.
xdmp:query-meters Returns the current value of the resource meters for this query sequence.
xdmp:query-trace Enables or disables tracing of this query.
xdmp:remove-orphaned-binary Remove an orphaned large binary .
xdmp:request Returns the unique key of the current request.
xdmp:rethrow Within the catch section of a try-catch expression, re-throw the currently caught error.
xdmp:schema-database Returns the database ID of the schema database associated with the current database.
xdmp:security-database Returns the database ID of the security database associated with the current database.
xdmp:server Returns the the ID(s) of the App Server specified in the parameter.
xdmp:server-name Return the name of the App Server with the given ID.
xdmp:servers Returns a sequence of the IDs of all the App Servers in the system.
xdmp:subbinary Returns a binary node made up of a subset of the given binary node.
xdmp:trace Signal a trace event.
xdmp:triggers-database Returns the database ID of the triggers database associated with the current database.
xdmp:uri-content-type Returns the content type of the given URI as matched in the mimetypes configuration.
xdmp:uri-format Returns the format of the given URI as matched in the mimetypes configuration.
xdmp:validate Returns an element containing a summary of validation errors in a node.
xdmp:version Returns the current MarkLogic Server version.