RE: [XQuery] Error Handling ?

well, I rest my case, since the situation is considered acceptable.
The bottom line is yet another implementation dependent
behavior and interoperability issue -- on doc() and collection().
But what can I do ? -- except keep the non-standard catch-error function 
in my engine!

I find a little strange  to delay an essential feature like error 
catching to
a distant future for the reason that its interaction with transactions
is not clearly seen. Is it such a new and unexplored problem ?
Following the same mode of reasoning, Java would have appeared
without try & catch ! (because transactions in Java are just an
additional package introduced in version 1.4)
In addition, it is very difficult to add a feature like this in a language
after years of utilization.

Best regards to all of you. Sorry to play the role of the grumbler.

>We did look very hard at this issue. We decided that it would be a
>mistake to tackle error recovery before defining the update facility in
>XQuery, which is likely to require introducing concepts such as
>transactions and rollback. We do know that it's a gap; you can't do
>everything in version 1.0.
>
>In fact you can't do everything in version 2.0 either; we've tried to
>tackle this in XSLT and haven't come up with a design that everyone
>finds acceptable.
>
>We took a look at all the dynamic errors that can be raised, to identify
>those where there is no preventative action available to the programmer.
>We found two such cases: errors in casting (e.g. converting a string to
>a date), which we made preventable by adding the "castable" operator,
>and errors in retrieving external resources using functions such as
>doc(). The specification for doc() allows implementations a great deal
>of freedom, and many implemementations are likely to provide mechanisms
>such as the JAXP URIResolver hook to allow users to tailor the behavior.
>A URIResolver can be used to recover from errors in retrieving a
>document, for example the URIResolver can return a standard error
>document containing information about the error.
>
>We realize that a real try/catch, integrated with transactions and
>rollback, is needed in the longer term, but we feel that the current
>situation is acceptable for XQuery 1.0.
>
>  
>

Received on Monday, 2 February 2004 08:45:54 UTC