Loading TOC...

MarkLogic Server 11.0 Product Documentation
dls:document-remove-collections

dls:document-remove-collections(
   $uri as xs:string,
   $collections as xs:string*
) as empty-sequence()

Summary

This function removes the named document from the specified collection.

Note that collections are not maintained in version history unless changes are also made to the content of the document.

Parameters
uri The URI of the document.
collections The collection from which to remove the document.

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-remove-collections(
        "/foo/bar/baz.xml",
        "http://marklogic.com/documents/foo")

  (: Removes 'bax.xml' from the 'foo' collection. :)
    

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