java.lang.Object
dev.metaschema.core.metapath.function.library.FnZeroOrOne
Implements the XPath 3.1 fn:zero-or-one
function.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ISequence<?>fnZeroOrOne(ISequence<?> sequence) Check that the provided sequence has zero or one items.
-
Method Details
-
fnZeroOrOne
Check that the provided sequence has zero or one items.Based on the XPath 3.1 fn:zero-or-one function.
- Parameters:
sequence- the sequence to evaluate- Returns:
- the sequence if it has zero or one items
- Throws:
InvalidArgumentFunctionException- with the codeInvalidArgumentFunctionException.INVALID_ARGUMENT_ZERO_OR_ONEif the sequence contains more than one item
-