Loading TOC...

MarkLogic Server 11.0 Product Documentation
dls.documentManage

dls.documentManage(
   uri as String,
   deep as Boolean,
   [annotation as Sequence]
) as null

Summary

This function places a document under management. A document must first be managed before it can be checked out. The document at the specified URI will become version 1 of this managed document.

Parameters
uri The URI of the document.
deep Specifies whether to manage this document as well as any documents for which this document has XInclude references to. Specify true to manage all XInclude references or false to not manage any included documents. The default is false.
annotation Any comments you want to add to the properties.

Required Privileges

The dls-user role is required to run this function, or the privilege:
http://marklogic.com/xdmp/privileges/dls-user

Example

// Makes 'baz.xml' a managed document, but not its referenced documents.

const dls = require('/MarkLogic/dls');

declareUpdate();
dls.documentManage('/foo/bar/baz.xml', 
                      false, 
                      'Baz is now a managed document');
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.