
dls:document-set-property( $uri as xs:string, $property as element() ) as empty-sequence()
This function sets a property on a document. If any properties with the same property QName exist, they are replaced with the new property. If no properties exist with the same QName, the new property is added.
| Parameters | |
|---|---|
| uri | The URI of the document. |
| property | The property to set. |
dls-user role is required to run
this function, or the privilege:http://marklogic.com/xdmp/privileges/dls-user
xquery version "1.0-ml";
import module namespace dls = "http://marklogic.com/xdmp/dls"
at "/MarkLogic/dls.xqy";
dls:document-set-property(
"/foo/bar/baz.xml",
<priority>1</priority>)
(: The <priority> property is set to the 'baz.xml' document. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.