Loading TOC...

MarkLogic 12 EA 1 Product Documentation
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);
=> ()

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