dls.documentAddProperties( uri as String, properties as Node[] ) as null
This function adds the specified properties to any existing properties associated with the named document.
Note that properties are not maintained in version history unless changes are also made to the content of the document.
Parameters | |
---|---|
uri | The URI of the document. |
properties | The properties to add. |
dls-user
role is required to run
this function, or the privilege:http://marklogic.com/xdmp/privileges/dls-user
// The <priority> and <status> properties are added to the 'baz.xml' document. const dls = require('/MarkLogic/dls'); declareUpdate() xdmp.documentAddProperties( '/foo/bar/baz.xml', ([fn.head(xdmp.unquote('<priority>1</priority>')).root, fn.head(xdmp.unquote('<status>unedited</status>')).root]));