[Home] [By Thread] [By Date] [Recent Entries]

  • From: David Brownell <david-b@p...>
  • To: "Scerri, Antony (ELSLON)" <antony.scerri@b...>,xml-dev@l...
  • 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@b...>
To: <xml-dev@l...>
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@b... )
> 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
> 


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member