RE: [XQuery] Error Handling ?

Paul,

I'm quite surprised that you should ask this question!!

> I am not sure why you would want the doc() function to be silent about
> errors it encounters.  Can you explain why you want this result?


xslt1 document function allows recovery (returning an empty node set)
but unfortunately doesn't mandate it. This means that it is impossible
to test for the existence of a document before loading it. Actually
as the test for an empty node set works on many systems, the situtation
is worse, stylesheets that work well in one place fall over elsewhere.

This is a well known interoperability problem (with no workaround in the
standard language) and fixing that was high on the wish list for xslt2
(including comments to this list)

As Xavier mentioned, if a general try/catch mechanism is too much for
v1 (or v2 of xslt) the WGs should at least try to plug this hole.

David

Received on Sunday, 1 February 2004 04:29:03 UTC