SAX: finalising org.sax.xml.Parser

Juergen Modre jmodre at
Tue Feb 24 14:31:59 GMT 1998

David Megginson wrote:
> After considering the various discussions over the past few weeks, I
> propose that we make the following changes:
> 1) Add a parse() method that accepts a stream.
Fully agree.

> 2) Add a parse() method that accepts a character buffer.
I have similar thoughts like James and therefore don't really see the need for it.
For the case to parse parts from an larger document the char[] can always be
converted to an InputStream to be used with 1).
But maybe your intention goes into another direction.

> 3) Remove public ID from the current parse() method (I don't think
>    public IDs are going anywhere fast in XML).
I propose to have a publicID.
E.g. the XML parser DXP supports public identifiers.

> With these changes, the interface would look like this in Java:
>    public void parse (String uri)
>      throws java.lang.Exception;
SGML/XML friendly "systemId" vs. Web-hacker-friendly "URI" as parameter name:
 I personally don't care to much about the name, both are appropiate.
 Maybe in a method with publicId the name "systemId" is better readable.
 Both names are fine as long as the are good described/documented
 (e.g. in the javadoc header in Java) to explain everybody the meaning.
> a. The baseURI argument is necessary for streams and character buffers
>    in case either contains a relative URI.  You can supply a null
>    value if the document entity will not contain relative URIs.
The baseURI gives you all information to parse every relative
EntityReference correctly. What's still missing is the name of the
document where the parsing started. So this name will miss in
an error-message in the starting entity. 

So I propose to have:
 public abstract void parse (String publicId, String systemId, InputStream inputStream)
instead of 
 public void parse (InputStream is, String baseURI)

 Reisdorf 6
 A-9371 Brueckl
 Austria (Europe)

 Phone:   ++43 4214 2320
 Mobile:  ++43 664 233 22 22
 E-mail:  jmodre at

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