SAX: Document Start and End (question 1 of 10)

Paul Prescod papresco at
Sun Jan 4 02:14:33 GMT 1998

David Megginson wrote:
> These events will make code using SAX much simpler and cleaner, and
> they come at a very low cost.  Furthermore, if a SAX-based application
> extends the XmlAppBase base class, then it can simply ignore these if
> they are not needed.

I agree, and for those of us who may not use XmlAppBase, it is probably
better to say: "it is very easy to ignore these events if they are not
needed." In other words, it is easy whether or not you are using
XmlAppBase. In any language supplying an empty callback is easy.

>   public void startDocument (String publicID, String systemID);
>   public void endDocument (int errors, int warnings);
> The latter, however, is very easy to track, and the former can be
> supplied to the constructor when the SAX event-handler is created, so
> both are redundant (if slightly convenient).

I would say that the extra information is not useful enough.

 Paul Prescod

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list