Loading TOC...

MarkLogic Server 11.0 Product Documentation
fn:one-or-more

fn:one-or-more(
   $arg as item()*
) as item()+

Summary

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].

Parameters
arg The sequence of items.

Example

fn:one-or-more( () )

=> XDMP-ZEROITEMS exception

fn:one-or-more("hello")

=> "hello"

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