MarkLogic 9 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.asOfQuery This function returns a query that matches the most recent numbered version of documents that were created before the specified date and time.
dls.authorQuery This function returns a query that matches documents authored by the specified user.
dls.breakCheckout This function breaks (unlocks) a checked-out document
dls.documentAddCollections This function adds the named document to the specified collections.
dls.documentAddPermissions This function adds the specified permissions for the named document.
dls.documentAddProperties This function adds the specified properties to any existing properties associated with the named document.
dls.documentCheckin This function checks in (unlocks) the document at the specified URI to allow other users to modify the document.
dls.documentCheckout This function checks out (locks) the document at the specified URI to prevent other users from modifying the document.
dls.documentCheckoutStatus This function returns a checkout element containing the checkout status of the specified document.
dls.documentCheckoutUpdateCheckin This function allows you to checkout, update, and checkin a managed document in a single transaction.
dls.documentDelete This function removes the specified managed document.
dls.documentExtractPart This function extracts an XML element from an existing document and creates a new document from the extracted element.
dls.documentGetPermissions This function gets the permissions for the specified document from the point of view of the Library Services API.
dls.documentHistory Returns the version history of the document located at the specified URI.
dls.documentIncludeQuery This function returns a query that matches any managed document that has an XInclude link that exactly matches the specified URI.
dls.documentInsertAndManage This function inserts a document into the database and places the document under management.
dls.documentIsManaged This function determines whether or not the document at the specified URI is managed.
dls.documentManage This function places a document under management.
dls.documentPurge This function deletes all numbered versions of the specified managed document and its referenced documents, as specified by the retention policies set by dls.retentionRule .
dls.documentRemoveCollections This function removes the named document from the specified collection.
dls.documentRemovePermissions This function removes the specified permissions from the named document.
dls.documentRemoveProperties This function removes the specified properties from the named document.
dls.documentRetentionRules This function returns a sequence of dls:retentionRule element nodes.
dls.documentSetCollections This function sets the named document to the specified collections.
dls.documentSetPermissions This function sets the specified permissions for the named document.
dls.documentSetProperties This function sets the properties of a document to the given sequence of elements.
dls.documentSetProperty This function sets a property on a document.
dls.documentSetQuality This function sets the quality of the document with the given URI.
dls.documentsQuery This function returns a query that matches the latest versions of the managed documents in the database.
dls.documentUnmanage Removes the specified document from management.
dls.documentUpdate This function updates the managed document at the specified URI with the specified contents.
dls.documentVersion This function returns a particular version of a managed document.
dls.documentVersionAsOf This function returns the most recent version of a document as of a point in time.
dls.documentVersionDelete This function removes the specified version of the managed document at the specified URI.
dls.documentVersionQuery This function returns a query that matches the specified version of the managed documents.
dls.documentVersionsQuery This function returns a query that matches any version of the specified URI.
dls.documentVersionUri This function returns the URI of the specified version of the document located at the specified URI.
dls.documentVersionUris This function returns the URIs of all versions of a managed document.
dls.latestValidationResults Returns a report describing the status of an upgrade from a pre-MarkLogic 8 DLS repository.
dls.linkExpand This function performs a single level expansion of a single XInclude reference.
dls.linkReferences This function returns a list of all the distinct URIs of documents referenced (either directly or indirectly) in the expansion of the node.
dls.nodeExpand 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.retentionRule functions.
dls.retentionRule This function creates and returns a retention rule element.
dls.retentionRuleInsert This function inserts retention rules into the database.
dls.retentionRuleRemove This function removes the specified retention rules from the database.
dls.retentionRules This function returns the specified retention rules from the database.
dls.setUpgradeStatus Sets DLS the upgrade status to current or compatibility-mode.
dls.startUpgrade Upgrades a previous version DLS Database to the current format.
dls.validateAllDocuments Returns a report of the status of the DLS upgrade process.
Powered by MarkLogic Server | Terms of Use | Privacy Policy