Loading TOC...

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

dls:document-remove-properties(
   $uri as xs:string,
   $property-names as xs:QName*
) as empty-sequence()

Summary

This function removes the specified properties from the named document.

Note that properties are not maintained in version history.

Parameters
uri The URI of the document.
property-names The properties to be removed.

Required Privileges

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

Usage Notes

You cannot remove any property nodes from the DLS namespace.

Example

  xquery version "1.0-ml";

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

  dls:document-remove-properties(
         "/foo/bar/baz.xml", 
         (fn:QName("http://marklogic.com/xdmp/property", "priority"),
          fn:QName("http://marklogic.com/xdmp/property", "status")))

  (: The <priority> and <status> properties are removed from the 
     'baz.xml' document. :)
    

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