OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: SAX: finalising org.sax.xml.Parser

[ Lists Home | Date Index | Thread Index ]
  • From: Juergen Modre <jmodre@edu.uni-klu.ac.at>
  • To: xml-dev Mailing List <xml-dev@ic.ac.uk>, David Megginson <ak117@freenet.carleton.ca>
  • Date: Tue, 24 Feb 1998 15:32:40 +0000

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.
         
> NOTES:
> 
> 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)


-----------------------------------------------
 JUERGEN MODRE
 Reisdorf 6
 A-9371 Brueckl
 Austria (Europe)

 Phone:   ++43 4214 2320
 Mobile:  ++43 664 233 22 22
 E-mail:  jmodre@edu.uni-klu.ac.at
 WWW:     http://www.edu.uni-klu.ac.at/~jmodre
-----------------------------------------------

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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS