[Bug 29119] [XP31] xs:error always raises a type error


--- Comment #12 from Michael Kay <mike@saxonica.com> ---
In response to the last part of comment #8:

As a SequenceType, xs:error is always an exception. A SequenceType is used to
describe the type of an XQuery 3.1 value, and xs:error can never be the type of
an XQuery 3.1 value.

This simply isn't true. xs:error is a type. Saying that "a type is an
exception" doesn't make sense. We don't even have a concept of "an exception".
A SequenceType does not "describe the type of a value", it describes the type
of a set of XDM values, and empty sets are perfectly legitimate beasts. 

It's true that xs:error can never be the type of an XQuery 3.1 value. But it's
a legal type, just as () is a legal value. It's a singularity in the type
system, just as "item()*" is, so it has some special implications: just as "X
instance of item()*" is always true, so "X instance of xs:error" is always
false. That doesn't make either expression useless, any more than the integer 0
or the string "" is useless.

You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 6 October 2015 10:22:52 UTC