fn.oneOrMore( $arg as ValueIterator ) as ValueIterator
Returns $arg if it contains one or more items. Otherwise, raises an error [err:FORG0004].
For detailed type semantics, see Section 7.2.16 The fn:zero-or-one, fn:one-or-more, and fn:exactly-one functions[FS].
|$arg||The sequence of items. If you pass in a single value, it is treated as a ValueIterator with that single item; therefore, if you pass in an array, the array is treated as a single value (not as one value for each item in the array). If you mean to pass in the values of each item in the array, then you can call xdmp.arrayValues on the array.|
fn.oneOrMore( null ) => XDMP-ZEROITEMS exception fn.oneOrMore("hello") => "hello"