[Bug 9252] [XQuery 1.1] Error handling in switch expression

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9252





--- Comment #1 from Michael Kay <mike@saxonica.com>  2010-03-16 11:18:31 ---
With regard to the last remark, it seems by following the link to "equivalence
of atomic values" that the unstated intent is perhaps:

* Both the "switch operand" and the "case operands" should be atomized, and
cast to string if they are untypedAtomic.

* In both cases, a type error is raised if the value contains more than one
item.

* No type error is raised if the values are not comparable; they are treated as
not equal.

The referenced rules for "equivalence of atomic values" don't really fit
properly, because they assume the rules are being used in the context of
grouping. For example, there's nothing that explicitly states what collation is
used; it's left to the reader to work out that it can only possibly be the
default collation from the static context of the switch expression.

Presumably it's reasonable to raise a warning if there is a case clause that
can never fire because the types are disjoint.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 16 March 2010 11:18:33 UTC