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] Re: [Sax-devel] SAX - endDocument() confusion again

[ Lists Home | Date Index | Thread Index ]


----- Original Message ----- 
From: "Michael Kay" <michael.h.kay@ntlworld.com>
To: "'Karl Waclawek'" <karl@waclawek.net>; "'Elliotte Rusty Harold'" <elharo@metalab.unc.edu>
Cc: <xml-dev@lists.xml.org>; <sax-devel@lists.sourceforge.net>
Sent: Saturday, February 28, 2004 1:52 PM
Subject: RE: [xml-dev] Re: [Sax-devel] SAX - endDocument() confusion again


> # > Taking this argument to extremes, is it acceptable for a parser not
> # > to call startDocument? Just to call fatalError? I have caught parsers
> # > doing this, especially when the error is very early in the document;
> # > e.g. in the byte order mark or the XML declaration.
> # 
> # I would say that at this point the document has started
> 
> So what constitutes a document "starting"? What happens if no resource with
> the given System ID can be found? 

Has not started. Error before calling StartDocument;

> What happens if a resource can be found,
> but it is zero-length? 

Has started, then fatalError, then ended.

> What happens if there is a timeout while trying to
> fetch the resource?

Tricky, but IOError, I would say. So has started, then some
call-backs, then IOError (maybe exception), then ended.

The main problem: Clear specification. If there had been one (not blaming anyone)
then this could have been implemented, and it would have proven (or disproven) 
itself as practical. Right now it seems the implementations do whatever makes
the most sense for either their internal design, or the set of real life problems
they were initially created for.

Karl




 

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

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