The exactly-one() function returns its argument unchanged, provided that it is a sequence containing exactly 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 not exactly one |
Result | item() | The same as the supplied value, after checking to ensure that it contains a single item |