Creating and Updating Collections
To create or update a document and add it to a collection, the unprotected-collections
privilege is required. You also need a role corresponding to an insert or update permission on the document. For a protected collection (a protected collection is created using the Admin Interface), you either need permissions to update that collection or the any-collection
execute privilege. If the collection is an unprotected collection, then you need the unprotected-collections
execute privilege. For details on adding collections while creating a document, see xdmp:document-load()
, xdmp:document-insert()
, and xdmp:document-add-collections()
in the XQuery/XSLT Functions by Name reference.