This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
XPath 3.1 section 3.11.3.1 has If the context item is not a map or an array, an error is raised [err:XPTY0tbd]. We need to allocate an error code. (Why not XPTY0004 as usual?) XPath maps A?n and ?n onto A(n) -- but not onto array:get(A, n). If n is out of range, all these XPath constructs throw XPDY0138. But array:get(A, n), and other functions like array:remove(), throw FOAY0001. Do we really want to have two different error codes for "array index out of range"? It makes it harder for users to remember which error to catch, and it makes it harder for implementors, because it isn't possible simply to compile A?n, A(n), and array:get(A, n) to identical code.
The working group decided on the following resolution at the 2014-11-25 teleconference: RESOLVED: to address bug 27382 by unifying the error codes in question, preferably by using FOAY0001. (Rationale: it's more memorable, and thus better for an error people are likely to want to catch frequently.)
Fixed in internal draft.
Confirmed that the fix has been applied.