-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
-
None
According to the DFDL spec, fn:exactly-one returns "True if the provided sequence contains exactly one node/value," which suggests that the function would return false if the sequence contains > or < 1 node/value.
The XPath description states that fn:exactly-one "returns $arg if it contains exactly one item. Otherwise, raises an error."
The actual behavior seems to be a combination of the two. If the provided sequence contains exactly one node/value, the function returns True (instead of $arg), and if the provided sequence contains > or < 1 node/value, the function throws the following error:
[error] Test edu.illinois.ncsa.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_exactly_one_02 failed: edu.illinois.ncsa.daffodil.processors.ParseError: Parse Error: Expression evaluation failed. Details: net.sf.saxon.trans.XPathException: A sequence of more than one item is not allowed as the first argument of fn:exactly-one() (<ex:item/>, <ex:item/>, ...)
- is related to
-
DFDL-1085 DPath: fn:exactly-one() Unsupported Function
- Closed