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 Tuesday, 17 February 2004 19:53:34 UTC