finalising org.sax.xml.Parser

Don Park donpark at quake.net
Mon Feb 23 15:29:47 GMT 1998


David,

I agree with most of the changes especially the KISS solution to multiple
input type problem.

I have just two recommendations:

1. Keep Public ID.
2. Use System ID instead of Public ID.

End result is that we just have two new methods in Parser and no change to
existing methods.

My reasons are:

1. Who knows where that rubber chicken will come in handy?
2. It is trivial for a SAX parser implementor to extract baseURI from URI.
3. It is not trivial and rather confusing for a SAX user to figure out what
the base URI is.

So the method signatures would be:

    public void
parse (String pubID, String sysID)
    throws java.lang.Exception;

    public void
parse (String pubID, String sysID, InputStream is)
    throws java.lang.Exception;

    public void
parse (String pubID, String sysID, char ch[], int offset, int length)
    throws java.lang.Exception;

PS: Parameter orders were changed because I prefer to append new arguments
rather prepending.

For the new methods, pubID and sysID are used to tell the parser that "data
from the given stream or character array should be treated as if it came
from given pubID and sysID".

Regards,

Don



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




More information about the Xml-dev mailing list