[Bug 5332] [UPD] Parentheses around () or fn:error()

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





------- Comment #2 from mike@saxonica.com  2008-01-01 19:04 -------
Another observation: the following is allowed by the current rules:

if ($a=1) 
  then ()
else if ($a=2)
  then error()
else if ($a=3)
  then delete node $x
else ()

but the following simplification is disallowed:

if ($a=3)
  then delete node $x
else if ($a=2)
  then error()
else ()

The reason is that in the second case the "else" branch of the outer "if" is
not an updating expression and is not one of the two permitted exceptions (()
and error()).

Received on Tuesday, 1 January 2008 19:04:20 UTC