W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2007

[Bug 4446] [XQuery] 2.3.4 Equivalent expressions

From: <bugzilla@wiggum.w3.org>
Date: Fri, 15 Jun 2007 14:46:33 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1HzD4L-0004uC-92@wiggum.w3.org>

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





------- Comment #2 from mike@saxonica.com  2007-06-15 14:46 -------
Looking at a bug report that came in from a customer yesterday, I think the
rule for conditional expressions could be a little stronger. The proposed text
was:

*  Conditional and typeswitch expressions MUST NOT raise a dynamic error in
respect of subexpressions occurring in a branch that is not selected.

My customer is doing

if (...some complex condition)
  then true()
  else error()

and under the current rules (even after the proposed modifications)

(a) the processor can determine that the result is either true() or an error
without evaluating one of the operands, namely the condition

(b) it's not covered by the the rule for conditional expressions as phrased
above.

So I propose a stronger wording for this rule:

*  Conditional and typeswitch expressions MUST NOT raise a dynamic error in
respect of subexpressions occurring in a branch that is not selected, and must
not return the value delivered by a branch unless that branch is selected.
Received on Friday, 15 June 2007 14:46:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:33 UTC