MarkLogic Server 11.0 Product Documentation
dls functions

The table below lists all the dls built-in functions (in this namespace: http://marklogic.com/xdmp/dls).

You can also view these functions broken down by category:

The Library Services API module is used to place documents under library service control, and allows you to perform functions such as checking in a document, checking out a document, and so on.

The Library Services API is installed as the following file:

install_dir/Modules/MarkLogic/dls.xqy

where install_dir is the directory in which MarkLogic Server is installed.

To use the dls.xqy module in your own XQuery modules, include the following line in your XQuery prolog:

import module namespace dls = "http://marklogic.com/xdmp/dls" 
  at "/MarkLogic/dls.xqy";

The library uses the dls: namespace, which is not predefined in the server.

MarkLogic recommends enabling the URI Lexicon when using Library Services; the URI lexicon will improve performance, especially when the database grows to a large number of documents.

50 functions
Function name Description
dls:as-of-query This function returns a query that matches the most recent numbered version of documents that were created before the specified date and time.
dls:author-query This function returns a query that matches documents authored by the specified user.
dls:break-checkout This function breaks (unlocks) a checked-out document
dls:document-add-collections This function adds the named document to the specified collections.
dls:document-add-permissions This function adds the specified permissions for the named document.
dls:document-add-properties This function adds the specified properties to any existing properties associated with the named document.
dls:document-checkin This function checks in (unlocks) the document at the specified URI to allow other users to modify the document.
dls:document-checkout This function checks out (locks) the document at the specified URI to prevent other users from modifying the document.
dls:document-checkout-status This function returns a checkout element containing the checkout status of the specified document.
dls:document-checkout-update-checkin This function allows you to checkout, update, and checkin a managed document in a single transaction.
dls:document-delete This function removes the specified managed document.
dls:document-extract-part This function extracts an XML element from an existing document and creates a new document from the extracted element.
dls:document-get-permissions This function gets the permissions for the specified document from the point of view of the Library Services API.
dls:document-history Returns the version history of the document located at the specified URI.
dls:document-include-query This function returns a query that matches any managed document that has an XInclude link that exactly matches the specified URI.
dls:document-insert-and-manage This function inserts a document into the database and places the document under management.
dls:document-is-managed This function determines whether or not the document at the specified URI is managed.
dls:document-manage This function places a document under management.
dls:document-purge This function deletes all numbered versions of the specified managed document and its referenced documents, as specified by the retention policies set by dls:retention-rule .
dls:document-remove-collections This function removes the named document from the specified collection.
dls:document-remove-permissions This function removes the specified permissions from the named document.
dls:document-remove-properties This function removes the specified properties from the named document.
dls:document-retention-rules This function returns a sequence of dls:retentionRule element nodes.
dls:document-set-collections This function sets the named document to the specified collections.
dls:document-set-permissions This function sets the specified permissions for the named document.
dls:document-set-properties This function sets the properties of a document to the given sequence of elements.
dls:document-set-property This function sets a property on a document.
dls:document-set-quality This function sets the quality of the document with the given URI.
dls:document-unmanage Removes the specified document from management.
dls:document-update This function updates the managed document at the specified URI with the specified contents.
dls:document-version This function returns a particular version of a managed document.
dls:document-version-as-of This function returns the most recent version of a document as of a point in time.
dls:document-version-delete This function removes the specified version of the managed document at the specified URI.
dls:document-version-query This function returns a query that matches the specified version of the managed documents.
dls:document-version-uri This function returns the URI of the specified version of the document located at the specified URI.
dls:document-version-uris This function returns the URIs of all versions of a managed document.
dls:document-versions-query This function returns a query that matches any version of the specified URI.
dls:documents-query This function returns a query that matches the latest versions of the managed documents in the database.
dls:latest-validation-results Returns a report describing the status of an upgrade from a pre-MarkLogic 8 DLS repository.
dls:link-expand This function performs a single level expansion of a single XInclude reference.
dls:link-references This function returns a list of all the distinct URIs of documents referenced (either directly or indirectly) in the expansion of the node.
dls:node-expand This function recursively examines the node for XInclude references and expands them, following the rules of the XInclude specification.
dls:purge This function deletes all numbered versions of managed documents and its referenced documents (such as /foo/bar.xml_versions/1-bar.xml), as specified by the retention policy set by one or more dls:retention-rule functions.
dls:retention-rule This function creates and returns a retention rule element.
dls:retention-rule-insert This function inserts retention rules into the database.
dls:retention-rule-remove This function removes the specified retention rules from the database.
dls:retention-rules This function returns the specified retention rules from the database.
dls:set-upgrade-status Sets DLS the upgrade status to current or compatibility-mode.
dls:start-upgrade Upgrades a previous version DLS Database to the current format.
dls:validate-all-documents Returns a report of the status of the DLS upgrade process.
Powered by MarkLogic Server | Terms of Use | Privacy Policy