Loading TOC...

MarkLogic 12 EA 1 Product Documentation
cts:reference-parse

cts:reference-parse(
   $reference as node()
) as cts:reference

Summary

Creates a reference to a value lexicon by parsing its XML or JSON representation, 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
reference A reference to a range index.

Example

cts:reference-parse(
  <cts:element-reference xmlns:cts="http://marklogic.com/cts">
    <cts:namespace-uri>http://example.com/namespace</cts:namespace-uri>
    <cts:localname>title</cts:localname>
  </cts:element-reference>
)
=>
cts:element-reference(
  fn:QName("http://example.com/namespace","title"),("type=unknown"))

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.