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] Piccolo Java SAX parser and others in the wild?

[ Lists Home | Date Index | Thread Index ]

On the subject of error handling, one of my biggest hassles in making
Saxon portable across different XML parsers has been differences in the
way they handle an exception thrown by a callback such as startElement.
They vary in whether or not such an exception is notified to the
ErrorHandler, and they vary in whether it re-emerges intact as an
exception thrown by the parse() method or whether it gets wrapped in
some other exception. The specs, of course, are very unspecific on such
points.

Michael Kay

> -----Original Message-----
> From: Elliotte Rusty Harold [mailto:elharo@metalab.unc.edu] 
> Sent: 24 February 2004 01:00
> To: Jeff Rafter
> Cc: xml-dev@lists.xml.org
> Subject: Re: [xml-dev] Piccolo Java SAX parser and others in the wild?
> 
> 
> At 12:36 PM -0800 2/23/04, Jeff Rafter wrote:
> >I think a quick search through the source of XmlParser.java from 
> >AElfred2 for "// FIXME" would produce a good list of known 
> limitations 
> >in the parser as well : ) Out of curiousity does your 
> conformance suite 
> >test for start/endDocuments and errors? I noticed you had reported 
> >something along those lines. Right now I think it is 
> actually possible 
> >to receive an error followed by an endDocument in AEflred2 
> without ever 
> >receiving a startDocument call. Pretty funny... part of the problem 
> >with guaranteeing the endDocument event.
> >
> 
> Yes. It's very careful to check that every document results in a 
> startDocument and an endDocument event, even in the face of a fatal 
> error. This is one of the most common mistakes that SAX parsers make.
> -- 
> 
>    Elliotte Rusty Harold
>    elharo@metalab.unc.edu
>    Effective XML (Addison-Wesley, 2003)
>    http://www.cafeconleche.org/books/effectivexml
>    
> http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosi
m/cafeaulaitA

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://www.oasis-open.org/mlmanage/index.php>





 

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

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