<export><workspace name="collections"><query name="insert-many-collections" focus="false" listorder="3" taborder="3" active="true" database="12000676252973117691" server="14950309219653925761" database-name="Documents" server-name="App-Services" mode="xquery">(:
  Insert a document into many collections
:)
xdmp:document-insert(
  "/test/collections.xml",
  &lt;test/&gt; ,
  xdmp:default-permissions(),
  ("foo", "bar", "baz")
)</query><query name="query-collection-foo" focus="false" listorder="2" taborder="2" active="true" database="12000676252973117691" server="14950309219653925761" database-name="Documents" server-name="App-Services" mode="xquery">
(:
  Search based on collection "foo"
:)

cts:search( fn:collection(), cts:collection-query( "foo" ) )</query><query name="delete-collection-baz" focus="false" listorder="3" taborder="3" active="true" database="12000676252973117691" server="14950309219653925761" database-name="Documents" server-name="App-Services" mode="xquery">(:
  Delete all documents in collect "baz"
:)

xdmp:collection-delete( "baz" )</query><query name="query-collection-foo" focus="true" listorder="4" taborder="4" active="true" database="12000676252973117691" server="14950309219653925761" database-name="Documents" server-name="App-Services" mode="xquery">(:
  Search based on collection "foo" - no results
:)

cts:search( fn:collection(), cts:collection-query( "foo" ) )
</query></workspace></export>
