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 ]

-----Original Message----- 
From: Michael Kay [mailto:michael.h.kay@ntlworld.com] 
Sent: Mon 7/8/2002 2:52 AM 
To: Dare Obasanjo; 'Jonathan Robie'; 'Mike Champion'; xml-dev@lists.xml.org 
Subject: RE: RE: [xml-dev] XQuery and DTD/Schema?

>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. 
I seem to remember a proposal for a function similar to the ternary operator in C for which the syntax escapes me. Something like 
   attempt(expr-to-attempt, expr-to-execute-on-success, expr-to-execute-on-failure)
which although not as complex as a structured exception handling mechanism like those in conventional programming languages like C# or C++ should satisfy users in most cases and not be onerous to implement. More complex exception handling mechanisms can be added in later versions of XQuery after user feedback has been gathered.  
>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. 

I personally believe this should be avoided as much as possible. The empty set (or sequence) is not the error value and should not be used interchangeably with it. 


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

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