Loading TOC...

cts.elementReference

cts.elementReference(
   $element as xs.QName,
   [$options as String[]]
) as cts.reference

Summary

Creates a reference to an element value lexicon, for use as a parameter to cts.valueTuples, temporal.axisCreate, 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.

Parameters
$element An element QName.
$options Options. The default is ().

Options include:

"type=type"
Use the lexicon with the type specified by type (int, unsignedInt, long, unsignedLong, float, double, decimal, dateTime, time, date, gYearMonth, gYear, gMonth, gDay, yearMonthDuration, dayTimeDuration, string, anyURI, point, or long-lat-point)
"collation=URI"
Use the lexicon with the collation specified by URI.
"nullable"
Allow null values in tuples reported from cts:value-tuples when using this lexicon.
"unchecked"
Read the scalar type, collation and coordinate-system info only from the input. Do not check the definition against the context database.
"coordinate-system=name"
Create a reference to an index or lexicon based on the specified coordinate system. Allowed values: "wgs84", "wgs84/double", "raw", "raw/double". Only applicable if the index/lexicon value type is point or long-lat-point.
"precision=value"
Create a reference to an index or lexicon configured with the specified geospatial precision. Allowed values: float and double. Only applicable if the index/lexicon value type is point or long-lat-point. This value takes precedence over the precision implicit in the coordinate system name.

Example

cts.elementReference(xs.QName("TITLE"));
=>
cts.elementReference(fn.QName("","TITLE"),
  ["type=string","collation=http://marklogic.com/collation/"])

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy