- From: Michael Kay <mhk@mhk.me.uk>
- Date: Wed, 18 Feb 2004 08:16:06 -0000
- To: "'Michael Rys'" <mrys@microsoft.com>, "'Stephen Buxton'" <Stephen.Buxton@oracle.com>, <public-qt-comments@w3.org>
I think there is another reason for not making error codes normative at this stage: the currently assigned codes are simply not good enough. I found, for example, cases where the XPath language book and F+O define different codes for the same casting error. Some codes are incredibly broad in scope, other very narrow, and the scopes overlap. A lot of design work is needed on the overall set of error codes before we can make them normative. Michael Kay > -----Original Message----- > From: public-qt-comments-request@w3.org > [mailto:public-qt-comments-request@w3.org] On Behalf Of Michael Rys > Sent: 18 February 2004 00:53 > To: Stephen Buxton; public-qt-comments@w3.org > Subject: RE: ORA-FO-266-B: Error codes should be normative (2) > > > > Since the W3C produces recommendations that need to be > validated by interoperable implementations, I doubt that you > can find two interoperable APIs for different implementation > environment where you can test such assertions. > > I think that the error codes should be recommendations (in the English > meaning) but that different APIs and embeddings of XQuery > specify how such error codes are being mapped into the > appropriate environment. > > Best regards > Michael > > > -----Original Message----- > > From: public-qt-comments-request@w3.org [mailto:public-qt-comments- > > request@w3.org] On Behalf Of Stephen Buxton > > Sent: Tuesday, February 17, 2004 2:44 AM > > To: public-qt-comments@w3.org > > Subject: ORA-FO-266-B: Error codes should be normative (2) > > > > > > SECTION Annex D: Error Summary > > > > The F&O document (as well as other documents) summarize > error codes in > an > > Annex that is labelled to be non-normative. In some ways, > this makes > > sense, because XQuery does not specify any sort of an API by which > errors > > can be "returned" to any entity. However, it is clear that > there will > be > > more than one such API (e.g., JSR 225, XQJ, is defining such an API > for > > use by Java programmers). > > > > It would be a serious problem if each API, and each XQuery > implementation, > > were free to return radically different error codes for identical > errors, > > as programmers would be unable to write code that is portable among > XQuery > > engines. > > > > Some way to make the error codes themselves normative (but, > of course, > > *not* the natural-language phrase that is associated with > the codes). > > > > One approach might be to state that whenever the XQuery > specification > > indicates that a specific error is to be raised, that the specified > > (normative) error code must be made available in an > implementation-defined > > way to the agent that caused the XQuery to be evaluted by > the XQuery > > engine. This is crude and clumsy, but definitely better > than nothing! > > The alternative would be to create an SQL-like diagnostics facility > that > > would allow users to execute a subsequent query to retrieve > the error > > code, etc. I doubt that would be acceptable for XQuery > 1.0, but would > be > > deferred to a future version. > > > > - Steve B. >
Received on Wednesday, 18 February 2004 03:15:25 UTC