[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: SAX2 Error Handling

  • 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

sax2 error
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
> 


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.