[Bug 16369] New: Invoking fn:error with a static error code.

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

           Summary: Invoking fn:error with a static error code.
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.0
        AssignedTo: mike@saxonica.com
        ReportedBy: ghislain.fourny@28msec.com
         QAContact: public-qt-comments@w3.org


I am unsure about the behavior of this query with respect to the spec and
versus what one could expect. Perhaps I just overlooked something?

declare namespace err= "http://www.w3.org/2005/xqt-errors";
try {
  fn:error(xs:QName("err:XPST0008"))
} catch err:XPST0008 { 0 }

Possibility 1. F&O says that "the effect of the error is identical to the
effect of dynamic errors raised implicitly". It would mean that the error,
since it is dynamic, is caught and 0 is returned.
Possibility 2. It is a static error code so one could also expect that it is
not caught (although it has been raised dynamically?).

Or, alternatively, would it make sense to raise a dynamic error err:XQDY.... if
fn:error is invoked with an error code that is defined in a specification and
that is a static error code?

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 14 March 2012 15:19:23 UTC