experimental extensions to MarkLogic cts functionality. Includes new query and lexicon types, and conversion functions for lexicon references.
Warning: this is experimental software! This module uses un-supported features of MarkLogic Server, which are subject to modification or removal without notice.Author: Joe Bryan
Version: 1.1.0
- Variables: $ctx:numeric-scalar-types
- Functions: ctx:root-element-query#1, ctx:root-element-query#2, ctx:element-child-query#2, ctx:element-child-query#3, ctx:element-attribute-query#2, ctx:element-attribute-query#3, ctx:path-query#1, ctx:path-query#2, ctx:path-query#3, ctx:field-query#3, ctx:root-QNames#0, ctx:root-QNames#1, ctx:root-QNames#2, ctx:db-path-namespaces#0, ctx:db-path-namespaces#1, ctx:reference-to-map#1, ctx:reference-from-map#1, ctx:reference-alias#1, ctx:resolve-reference-from-index#1, ctx:reference-query#1, ctx:reference-query#2, ctx:reference-query#3
$ctx:numeric-scalar-types as xs:string+
numeric lexicon scalar types
ctx:root-element-query($qname as xs:QName) as cts:query
returns a cts:query
matching fragments with a given root QName
- $qname as
xs:QName
ctx:root-element-query($qname as xs:QName, $query as cts:query?) as cts:query
returns a cts:query
matching fragments with a given root QName, constrained
by the query param
- $qname as
xs:QName
- $query as
cts:query?
ctx:element-child-query($qname as xs:QName, $child as xs:QName) as cts:query
returns a cts:query
matching fragments with the given parent/child QNames
- $qname as
xs:QName
- $child as
xs:QName
ctx:element-child-query($qname as xs:QName, $child as xs:QName, $query as cts:query?) as cts:query
returns a cts:query
matching fragments with the given parent/child QNames,
constrained by the query param
- $qname as
xs:QName
- $child as
xs:QName
- $query as
cts:query?
ctx:element-attribute-query($qname as xs:QName, $attr as xs:QName) as cts:query
returns a cts:query
matching fragments with the given element/attribute QNames
- $qname as
xs:QName
- $attr as
xs:QName
ctx:element-attribute-query($qname as xs:QName, $attr as xs:QName, $query as cts:query?) as cts:query
returns a cts:query
matching fragments with the given element/attribute QNames,
constrained by the query param
- $qname as
xs:QName
- $attr as
xs:QName
- $query as
cts:query?
ctx:path-query($path-expression as xs:string) as cts:query
returns a cts:query
matching fragments containing $path-expression
- $path-expression as
xs:string
ctx:path-query($path-expression as xs:string, $namespaces as xs:string*) as cts:query
returns a cts:query
matching fragments containing $path-expression
- $path-expression as
xs:string
- $namespaces as
xs:string*
ctx:path-query($path-expression as xs:string, $scalar-type as xs:string, $collation as xs:string?) as cts:query
returns a cts:query
matching fragments with values of $type
in $path-expression
(requires a matching path-range-index)
- $path-expression as
xs:string
- $scalar-type as
xs:string
- $collation as
xs:string?
ctx:field-query($field-name as xs:string, $scalar-type as xs:string, $collation as xs:string?) as cts:query
returns a cts:query
matching fragments with values of $type
in $field-name
(requires a matching path-range-index)
- $field-name as
xs:string
- $scalar-type as
xs:string
- $collation as
xs:string?
ctx:root-QNames() as xs:QName*
a "pseudo-lexicon" of root-element QNames; returns a sequence of all document-root element QNames
ctx:root-QNames($arg) as xs:QName*
a "pseudo-lexicon" of root-element QNames; returns a sequence of document-root element QNames
where document matches $arg
. (if $arg
is a QName, matches documents containing an element of that name)
- $arg as
cts:query
orxs:QName
ctx:root-QNames($query as cts:query?, $excluded-roots as xs:QName*) as xs:QName*
a "pseudo-lexicon" of root-QNames; returns a sequence of document-root element QNames
constrained by $query
, excluding $excluded-roots
- $query as
cts:query?
- $excluded-roots as
xs:QName*
ctx:db-path-namespaces() as xs:string*
returns the database-path-namespaces as a sequence of alternating namespace prefixes and URIs
ctx:db-path-namespaces($database-id as xs:unsignedLong) as xs:string*
- $database-id as
xs:unsignedLong
ctx:reference-to-map($reference as cts:reference) as map:map
constructs a map from a cts:reference
object
- $reference as
cts:reference
ctx:reference-from-map($map as map:map) as cts:reference?
constructs a cts:reference
object from a map
- $map as
map:map
ctx:reference-alias($reference as cts:reference) as xs:string
returns a string alias describing a `cts:reference object
- $reference as
cts:reference
ctx:resolve-reference-from-index($node) as cts:reference*
constructs 1-or-more cts:reference
objects from the given index definition
- $node as
element(db:*-index)
(as returned by the admin API)
ctx:reference-query($reference as cts:reference) as cts:query
constructs a cts:query
matching fragments that contain a cts:reference
- $reference as
cts:reference
ctx:reference-query($reference as cts:reference, $values as xs:anyAtomicType*) as cts:query
constructs an =
range query from a cts:reference
and 1-or-more values
- $reference as
cts:reference
- $values as
xs:anyAtomicType*
ctx:reference-query($reference as cts:reference, $operator as xs:string, $values as xs:anyAtomicType*) as cts:query
constructs a range query from a cts:reference
and 1-or-more values
- $reference as
cts:reference
- $operator as
xs:string
- $values as
xs:anyAtomicType*
Generated by xquerydoc
- Copyright (c) 2014 Joseph Bryan. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
[http://www.apache.org/licenses/LICENSE-2.0] (http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
The use of the Apache License does not indicate that this project is affiliated with the Apache Software Foundation.