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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

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

[ Lists Home | Date Index | Thread Index ]

Mike,

> 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.

I had the (probably baseless) impression that an "error object" would
be returned rather than thrown, with its value being an error message
or something, so you could do something like:

  let $date := cast as xs:date('2002-02-29')
  if   ($date instance of error)
  then concat('Invalid date: ', $date)
  else ...

Is that not feasible?
  
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.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