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

Paul Prescod (papresco@technologist.com)
Sat, 03 Jan 1998 20:11:56 -0500


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