ort:value-count( $value as ort:value ) as xs:unsignedLong
Returns the number of ort:value
in an ort:value
with value type "SEQUENCE", and always return 2 for "MAP".
Parameters | |
---|---|
$value |
An ort:value , with value type "SEQUENCE" or "MAP".
|
let $m := ort:map(ort:string(("key1", "key2"),(2)),ort:value((1,2),(2),"float")) return ort:value-count($m) => 2
let $s := ort:sequence((ort:value((2,3),(2),"float"),ort:value((1),(1),"float"),ort:value((2),(1),"float"))) return ort:value-count($s) => 3
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.