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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: SAX2 Error Handling

[ Lists Home | Date Index | Thread Index ]
  • From: David Brownell <david-b@pacbell.net>
  • To: "Scerri, Antony (ELSLON)" <antony.scerri@biomednet.com>,xml-dev@lists.xml.org
  • Date: Fri, 08 Dec 2000 11:10:02 +0000

Well, I certainly think that AElfred2 package does it "right",
but I also recall some ambiguity in the SAX spec from ages ago.
At one point, a number of SAX parsers mangled exceptions that
were reported by application handlers.  Some of the conformance
tests I provided last year show some related problems.

My reasoning:  if the application wants an ErrorHandler to be
called, it's in a position to do it directly ... and classify
the SAXException appropriately:  error, warning, or fatal.

But no parser can correctly categorize "caught" exceptions like
that.  So, it handles exceptions thrown by a ContentHandler in
exactly the way it handles ones thrown by an ErrorHandler:
pass them right back to whoever invoked the parse.

- Dave

----- Original Message ----- 
From: Scerri, Antony (ELSLON) <antony.scerri@biomednet.com>
To: <xml-dev@lists.xml.org>
Sent: Wednesday, December 06, 2000 3:42 PM
Subject: SAX2 Error Handling

> Hi
> I am using a modified Aelfred SAX2 parser (provided as part of the
> org.brownell.xml.aelfred2 Java package). I would like to know if any one can
> tell me whether the ErrorHandler component of a SAX application will be
> called when a SAXException is raised by you inside your ContentHandler. I
> know if the SAX driver causes has a problem then the ErrorHandler is called
> passing a SAXException. In the case of the ContentHandler throwing a
> SAXException when using Aelfred2 the exception bubbles up back to my
> application that launched the SAX Driver.
> Tony
> ----------------------------------------------------------------------------
> ----------------------
> Antony Scerri ( antonys@biomednet.com )
> Senior Web Developer
> Elsevier Science London
> 84 Theobald's Road
> London
> UK  WC1X 8RR
> Direct : 44 (0) 207 611 4334
> Office : 44 (0) 207 611 4000
> Fax    : 44 (0) 207 611 4001


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

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