Loading TOC...

cts.pathReference

cts.pathReference(
   $path-expression as String,
   [$options as String[]],
   [$map as Object]
) as cts.reference

Summary

Creates a reference to a path value lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist.

Parameters
$path-expression A path range index expression.
$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.
"coordinate-system=coord"
Use the given coordinate system. Possible values are "wgs84" and "raw".
"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.
$map A map of namespace bindings. The keys should be namespace prefixes and the values should be namespace URIs. These namespace bindings will be added to the in-scope namespace bindings in the interpretation of the path.

Example

cts.pathReference("/section/title");
=>
cts.pathReference("/section/title",
  ["type=string","collation=http://marklogic.com/collation/"])

Example

cts.pathReference("/a:section/b:title",
  ["type=string","collation=http://marklogic.com/collation/codepoint"],
  {a:"a-namespace", b:"b-namespace"});
=>
cts.pathReference("/a:section/b:title",
  ["type=string","collation=http://marklogic.com/collation/codepoint"],
  {a:"a-namespace", b:"b-namespace"})

Comments

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