MarkLogic Server 11.0 Product Documentation
dls.documentRemoveProperties

dls.documentRemoveProperties(
   uri as String,
   property-names as xs.QName[]
) as null

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

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

const dls = require('/MarkLogic/dls');

declareUpdate();
dls.documentRemoveProperties(
         '/foo/bar/baz.xml', 
         [fn.QName('http://marklogic.com/xdmp/property', 'priority'),
          fn.QName('http://marklogic.com/xdmp/property', 'status')]);
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy