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

Re: Piccolo Java SAX parser and others in the wild?


piccolo xerces crimson
At 4:39 PM -0500 2/22/04, John Cowan wrote:

>Poor QOI, but technically a parser can make demons fly out of your nose
>if you feed it non-XML.

That's only according to the XML spec. The SAX spec is a little more 
prescriptive, including a strict non-demon guarantee. :-) My reading 
of the SAX Javadocs says that when a parser encounters a malformed 
document, it must, at a minimum:

1. Call startDocument
2. Call fatalError
3. Call endDocument
4. Throw a SAXException or an IOException. All other kinds of 
exceptions must be wrapped in a SAXException.

It may also optionally report content from before it first detected 
the well-formedness error by calling other methods at the appropriate 
locations. However 1 through 4 are required, in that order.

1 and 3 would be skipped only if the application has not registered a 
ContentHandler. 2 would be skipped only if the application has not 
registered an ErrorHandler. Depending on the document, I've seen 
Piccolo skip each one of these, though never all four at once. 
Xerces, Crimson, and Oracle fall down on #3; though they do a pretty 
good job with 1, 2, and 4.
-- 

   Elliotte Rusty Harold
   elharo@m...
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA

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.