<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/cts.elementReference.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>cts.elementReference</api:function-name><api:suggest>cts.elementreference</api:suggest><api:suggest>cts</api:suggest><api:suggest>elementreference</api:suggest><api:function-link mode="xquery" fullname="cts:element-reference">/apidoc/8.0/cts:element-reference.xml</api:function-link><api:function mode="javascript" name="elementReference" type="builtin" lib="cts" category="SearchBuiltins" subcategory="Lexicon" hidden="false" bucket="MarkLogic Built-In Functions" prefix="cts" namespace="http://marklogic.com/cts" fullname="cts.elementReference"><api:summary>
  Creates a reference to an element value lexicon, for use as a parameter to
  <a href="./cts.valueTuples" class="javascript" xmlns="http://www.w3.org/1999/xhtml"><code>cts.valueTuples</code></a>, 
  <a href="./temporal.axisCreate" class="javascript" xmlns="http://www.w3.org/1999/xhtml"><code>temporal.axisCreate</code></a>, or any 
  other function that takes an index reference.  Since lexicons are 
  implemented with range indexes, this function will throw an exception if 
  the specified range index does not exist.
</api:summary><api:params><api:param name="element" type="xs:QName"><api:param-description>
    An element QName.</api:param-description><api:param-name>element</api:param-name><api:param-type>xs.QName</api:param-type></api:param><api:param name="options" type="xs:string*" optional="true"><api:param-description>
    Options.  The default is ().
    <p xmlns="http://www.w3.org/1999/xhtml">
      Options include:</p>
      <blockquote xmlns="http://www.w3.org/1999/xhtml"><dl>
        <dt>"type=<em>type</em>"</dt>
        <dd>Use the lexicon with the type specified by <em>type</em>
        (int, unsignedInt, long, unsignedLong, float, double, decimal,
        dateTime, time, date, gYearMonth, gYear, gMonth, gDay,
        yearMonthDuration, dayTimeDuration, string, anyURI, point, or
        long-lat-point)</dd>
        <dt>"collation=<em>URI</em>"</dt>
        <dd>Use the lexicon with the collation specified by <em>URI</em>.</dd>
        <dt>"coordinate-system=<em>coord</em>"</dt>
        <dd>Use the given coordinate system. Possible values
        are "wgs84" and "raw".</dd>
        <dt>"nullable"</dt>
        <dd>Allow null values in tuples reported from cts:value-tuples when
        using this lexicon.</dd>
        <dt>"unchecked"</dt>
        <dd>Read the scalar type, collation and coordinate-system info
        only from the input. Do not check the definition against the
        context database.</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>cts.reference</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
cts.elementReference(xs.QName("TITLE"));
=&gt;
cts.elementReference(fn.QName("","TITLE"),
  ["type=string","collation=http://marklogic.com/collation/"])
</pre></api:example></api:function></api:function-page>