[Bug 5288] [XQuery] XPST0005 and conditional expressions

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





------- Comment #4 from mike@saxonica.com  2008-01-24 00:26 -------
I think this rule is very arbitrary and unfortunate. It breaks compositionality
- if two expressions have the same static and dynamic semantics then it should
be possible to use them interchangeably. A much better rule would be:

it is a static error if the static type of the expression on the rhs of the "/"
operator is empty-sequence().

And there might be a few other contexts where one wants to apply the same rule,
e.g. to the expression in a predicate, the expression in an order by clause,
etc.

Received on Thursday, 24 January 2008 00:26:45 UTC