This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
With the introduction of try/catch, predictability of error codes is becoming increasingly important. There seems to be a big overlap between XPTY0019 and XPTY0020. Given the expression 23/x when we look at the rules for the "/" operator, we raise XPTY0019 because the LHS is not a node; but when we look at the rules for the axis step "x", we raise XPTY0020 because the context item is not a node. There's no indication of which of these takes precedence. However, when the RHS of "/" is something other than an Axis Step, XPTY0019 is the only permitted error code; but when an Axis Step appears other than on the RHS of "/" (for example 23[x]), XPTY0020 is the only permitted code. I'm finding it almost impossible to keep enough information through tree rewrites to maintain these distinctions: for example it means that "for $x in ABC where $x/@a return $x" cannot safely be rewritten as ABC[@a]. So I would like to propose that all uses of XPTY0019 be replaced by XPTY0020.
The WG decided to make no change to the specification.