[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: [Sax-devel] SAX - endDocument() confusion again
----- Original Message ----- From: "Michael Kay" <michael.h.kay@n...> To: "'Karl Waclawek'" <karl@w...>; "'Elliotte Rusty Harold'" <elharo@m...> Cc: <xml-dev@l...>; <sax-devel@l...> Sent: Saturday, February 28, 2004 1:52 PM Subject: RE: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|