Lists Home |
Date Index |
- From: email@example.com
- To: David Brownell <firstname.lastname@example.org>
- Date: Thu, 8 Apr 1999 18:17:23 -0600
David Brownell wrote:
> I'm still unclear on what you're suggesting ... suspect I'm
> not alone in it! Do you have an example, maybe?
> Remember that compatibility is a ground rule for everyone.
Yes, I've been thinking a lot about this recently and have
come up with an example of how the SAX 1.0 could be refactored.
First, I looked at the SAX interfaces and classes that are of
general use to all parsers. My list includes the following:
The EntityResolver, InputSource, and Locator objects can be
used without modification. Because general error handling is
useful to all parsers, I would rename SAXException to
XMLException and do the same for SAXParseException. These
name changes would affect the ErrorHandler callback methods.
I would keep the Parser interface the same except for
removing the callback registration methods (setDTDHandler
and setDocumentHandler) that are specific to a stream based
parser. To enable the stream based parsing functionality, I
would add a SAXParser interface that extends the new Parser
interface to add the callback registration methods.
(I'm not including code examples of what these new interfaces
and classes look like in order to keep this posting short. But
I could post further if there was interest.)
I realize that compatability with SAX 1.0 is very important
to retain. I would suggest keeping the org.xml.sax and
org.xml.sax.helpers packages the same -- don't change them
at all. Nothing would be moved or renamed. In this way,
users of SAX 1.0 would not have to change their code.
The refactored SAX could be moved to new packages. For
example, org.xml and org.xml.sax2. The org.xml package would
contain all of the general purpose interfaces and objects
and org.xml.sax2 would contain the specific SAX objects. The
latter would include all of the SAX2 extensions being
discussed now on the mailing list, as well.
Andy Clark * IBM, JTC - Silicon Valley * email@example.com
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)