<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.collectionProperties.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.collectionProperties</api:function-name><api:suggest>xdmp.collectionproperties</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>collectionproperties</api:suggest><api:function-link mode="xquery" fullname="xdmp:collection-properties">/apidoc/8.0/xdmp:collection-properties.xml</api:function-link><api:function mode="javascript" name="collectionProperties" type="builtin" lib="xdmp" category="Extension" subcategory="Documents, Directories, Properties, and Locks" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.collectionProperties"><api:summary>
  Returns a sequence of properties documents, one for each document in the
  specified collection(s) that has a corresponding properties document.
</api:summary><api:params><api:param name="uri" type="xs:string*" optional="true"><api:param-description>
    The URI(s) of the collection(s).
  </api:param-description><api:param-name>uri</api:param-name><api:param-type>String[]</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
for (var d of xdmp.collectionProperties(
                   ["http://example.com/col1/",
                    "http://example.com/col2/"])) {
  if ( d.root.xpath("/property::cpf:error",
                    {"cpf": "http://marklogic.com/cpf"}) ) {
    xdmp.nodeUri(d);
  };
};

  =&gt; A list of document URIs of documents that have a
     cpf:error property in their corresponding properties
     documents.  For example:

     http://example.com/bar.xml http://example.com/baz.xml
</pre></api:example></api:function></api:function-page>