ort:get-value( $value as ort:value, $index as xs:unsignedLong ) as ort:value
For an ort:value
with value type "SEQUENCE", returns the
ort:value
at specified index; for value type "MAP", index 0 returns
the key, and index 1 returns the value.
Parameters | |
---|---|
$value |
An ort:value , with value type "SEQUENCE" or "MAP".
|
$index | The index. |
let $m := ort:map(ort:string(("key1","key2"),(2)),ort:value((1,2),(2),"float")) return ort:get-value($m,0) => OrtValue(Shape:[2], Type: STRING)
let $m := ort:map(ort:string(("key1","key2"),(2)),ort:value((1,2),(2),"float")) return ort:get-value($m,1) => OrtValue(Shape:[2], Type: FLOAT)
let $s := ort:sequence((ort:value((2,3),(2),"float"),ort:value((1),(1),"float"),ort:value((2),(1),"float"))) return ort:get-value($s,1) => OrtValue(Shape:[1], Type: FLOAT)