dls functions

The table below lists all the "dls" XQuery library 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.

46 functions
Function nameDescription
dls:as-of-queryThis 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-checkoutThis 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-propertiesThis function adds the specified properties to any existing properties associated with the named document.
dls:document-checkinThis function checks in (unlocks) the document at the specified URI to allow other users to modify the document.
dls:document-checkoutThis function checks out (locks) the document at the specified URI to prevent other users from modifying the document.
dls:document-checkout-statusThis 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-deleteThis function removes the specified managed document.
dls:document-extract-part This function extracts an 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-historyReturns the version history of the document located at the specified URI.
dls:document-include-queryThis function returns a query that matches any managed document that has an XInclude link that exactly matches the specified URI.
dls:document-insert-and-manageThis function inserts a document into the database and places the document under management.
dls:document-is-managedThis function determines whether or not the document at the specified URI is managed.
dls:document-manageThis function places a document under management.
dls:document-purgeThis function deletes all numbered versions of the specified managed document and its referenced documents, as specified by the rention policies set by dls:retention-rule.
dls:document-remove-collectionsThis function removes the named document from the specified collection.
dls:document-remove-permissionsThis function removes the specified permissions from the named document.
dls:document-remove-propertiesThis function removes the specified properties from the named document.
dls:document-retention-rulesThis function returns the retention rules that apply to the document at the specified URI.
dls:document-set-collections This function sets the named document to the specified collections.
dls:document-set-permissionsThis function sets the specified permissions for the named document.
dls:document-set-propertiesThis function sets the properties of a document to the given sequence of elements.
dls:document-set-propertyThis function sets a property on a document.
dls:document-set-qualityThis function sets the quality of the document with the given URI.
dls:document-unmanageRemoves the specified document from management.
dls:document-updateThis function updates the managed document at the specified URI with the specified contents.
dls:document-versionThis function returns a particular version of a managed document.
dls:document-version-as-ofThis function returns the most recent version of a document as of a point in time.
dls:document-version-deleteThis function removes the specified version of the managed document at the specified URI.
dls:document-version-queryThis function returns a query that matches the specified version of the managed documents.
dls:document-version-uriThis function returns the URI of the specified version of the document located at the specified URI.
dls:document-version-urisThis function returns the URIs of all versions of a managed document.
dls:document-versions-queryThis function returns a query that matches any version of the specified URI.
dls:documents-queryThis function returns a query that matches the latest versions of the managed documents in the database.
dls:link-expandThis function performs a single level expansion of a single XInclude reference.
dls:link-referencesThis function returns a list of all the distinct URIs of documents referenced (either directly or indirectly) in the expansion of the node.
dls:node-expandThis function recursively examines the node for XInclude references and expands them, following the rules of the XInclude specification.
dls:purgeThis 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 rention policy set by one or more dls:retention-rule functions.
dls:retention-ruleThis function creates and returns a retention rule element.
dls:retention-rule-insertThis function inserts retention rules into the database.
dls:retention-rule-removeThis function removes the specified retention rules from the database.
dls:retention-rules This function returns the specified retention rules from the database.