The zero-or-one() function returns its argument unchanged, provided that it is a sequence containing no more than one item. In other cases, it reports an error.
| Argument | Data Type | Meaning |
|---|---|---|
| value | item()* | The input value. Although the function signature says that any sequence of items is allowed, a runtime error will occur if the number of items is more than one |
| Result | Item() | The same as the supplied value, after checking to ensure that it is either an empty sequence or contains a single item |