<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/temporal.collectionCreate.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>temporal.collectionCreate</api:function-name><api:suggest>temporal.collectioncreate</api:suggest><api:suggest>temporal</api:suggest><api:suggest>collectioncreate</api:suggest><api:function-link mode="xquery" fullname="temporal:collection-create">/apidoc/8.0/temporal:collection-create.xml</api:function-link><api:function mode="javascript" name="collectionCreate" lib="temporal" category="Temporal" hidden="false" bucket="MarkLogic Built-In Functions" prefix="temporal" namespace="http://marklogic.com/xdmp/temporal" fullname="temporal.collectionCreate"><api:summary>
	  This function constructs a named and protected temporal collection 
	  in the schema database with the specified system and valid axes.  
	  This function assumes that the system and valid axes already exist.  
	  The temporal collection is stored in the Security database.  
	  <p xmlns="http://www.w3.org/1999/xhtml">A TEMPORAL-DUPCOLLECTION exception is thrown if the collection 
          already exists.  </p>  <p xmlns="http://www.w3.org/1999/xhtml">
  For details on how to create a collection, see  
 <a href="/guide/temporal/temporal-quick-start#id_66392">Create a Temporal Collection</a> in the <em>Temporal Developer's Guide</em>
  </p>
  </api:summary><api:params><api:param name="collection-name" type="xs:string"><api:param-description>
    The name to be used to identify the temporal collection.
    </api:param-description><api:param-name>collection-name</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="system-axis" type="xs:string"><api:param-description>
    The name of the axis to be used by the collection as the system axis.
    </api:param-description><api:param-name>system-axis</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="valid-axis" type="xs:string"><api:param-description>
    The name of the axis to be used by the collection as the valid axis.
    </api:param-description><api:param-name>valid-axis</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="options" type="xs:string*" optional="true"><api:param-description>
    Options to control access to the temporal collection:  
    <blockquote xmlns="http://www.w3.org/1999/xhtml">
        <dl>
         <dt> <pre>updates-admin-override</pre>
        </dt>
	<dd>    
		Specifies that users with the admin role can change or delete 
		temporal documents using non-temporal functions, 
		such as <code>xdmp:document-insert</code> and 
		<code>xdmp:document-delete</code>.
        </dd>
         <dt> <pre>updates-safe</pre>
        </dt>
	<dd>
	Specifies that no users, including those with the admin role, can 
	change or delete temporal documents in a non-temporal manner.
	This is the default.
        </dd>
        </dl> 
        </blockquote>    
    </api:param-description><api:param-name>options</api:param-name><api:param-type>String[]</api:param-type></api:param></api:params><api:return>String</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
var temporal = require("/MarkLogic/temporal.xqy");

temporal.collectionCreate("temporalCollection", "system", "valid");

// Creates a temporal collection, named "temporalCollection", with the 
// "system" and "valid" axes. Use temporal.axisCreate to create the 
// "system" and "valid" axes.  Returns the ID of the temporal collection.
</pre></api:example></api:function></api:function-page>