dls:document-manage( $uri as xs:string, $deep as xs:boolean, [$annotation as item()*] ) as empty-sequence()
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.
dls-user
role is required to run
this function, or the privilege:http://marklogic.com/xdmp/privileges/dls-user
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. :)