Loading TOC...

xdmp.documentSetProperties

xdmp.documentSetProperties(
   $uri as String,
   $props as Node[]
) as null

Summary

Sets the properties of a document to the given sequence of elements, replacing any properties that already exist on the document. To preserve existing document properties, use xdmp:document-add-properties. Each element QName is the property name and the element value is the property value. Modifying properties requires update permissions on a document.

Parameters
$uri The URI of the document.
$props The properties to set. Replaces any properties already set on the document.

Example

declareUpdate();
var props = [fn.head(xdmp.unquote('<priority>1</priority>')).root,
             fn.head(xdmp.unquote('<status>unedited</status>')).root];
xdmp.documentSetProperties(
       "/example.json", props);
=> ()

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy