Loading TOC...

dls:document-add-properties

dls:document-add-properties(
   $uri as xs:string,
   $properties as element()*
) as empty-sequence()

Summary

This function adds the specified properties to any existing properties associated with the named document.

Note that properties are not maintained in version history.

Parameters
$uri The URI of the document.
$properties The properties to add.

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 add any property nodes to the DLS namespace.

Example

  xquery version "1.0-ml";


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

  dls:document-add-properties(
              "/foo/bar/baz.xml", 
              (<priority>1</priority>,
               <status>unedited</status>))

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

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