dls:document-unmanage( $uri as xs:string, $deep as xs:boolean, $remove-versions as xs:boolean ) as empty-sequence()
Removes the specified document from management. You must have update permissions on the document to unmanage the 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-unmanage("/foo/bar/baz.xml", fn:false(), fn:true()) (: Unmanages 'baz.xml', but maintains management of its referenced documents. All versions but the latest version of this document are deleted. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.