[Bug 27382] New: [x31] Arrays - errors

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27382

            Bug ID: 27382
           Summary: [x31] Arrays - errors
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath 3.1
          Assignee: jonathan.robie@gmail.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 20 November 2014 16:14:00 UTC