Loading TOC...

MarkLogic 10 Product Documentation
dls:document-manage

dls:document-manage(
   $uri as xs:string,
   $deep as xs:boolean,
   [$annotation as item()*]
) as empty-sequence()

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

  xquery version "1.0-ml";

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

  dls:document-manage("/foo/bar/baz.xml", 
                      fn:false(), 
                      "Baz is now a managed document") 
      
  (: Makes 'baz.xml' a managed document, but not its referenced documents. :)
    

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