OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: RE: [xml-dev] XQuery and DTD/Schema?

[ Lists Home | Date Index | Thread Index ]

> As for error handling, I pray it isn't a structured exception 
> handling/try-catch proposal that makes it into the WD. I 
> can't even imagine the concept of using try...catch in XQuery 
> with a straight face. 

Most of the XQuery WG agreed with your view that a fully-featured try/catch was OTT. In particular, there are potential future interactions with transactions that we didn't like. This unfortunately means we are currently left without any mechanism to test whether 2002-02-29 is a valid date, without casting it and causing a catastrophic failure if it isn't. 

If you have any constructive suggestions as to what kind of error-handling facility would keep your face straight, I'm sure the WG will be interested in hearing it. Note that XSLT also has problems in this area: the inability of applications to deal with errors from the document() function is a perennial user complaint.

One design approach, of course, is for functions to return () (or other special values such as NaN) rather than throwing errors. The disadvantage of this is that there is no opportunity to provide diagnostics indicating the nature of the failure.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com 





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS