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: David Megginson <ak117@freenet.carleton.ca>, xml-dev Mailing List <xml-dev@ic.ac.uk>
  • Date: Wed, 25 Feb 1998 16:10:01 +0000

David Megginson wrote:
> This is a very good point, as was the suggestion earlier (I don't
> remember whose it was) that we rearrange arguments in order of
> decreasing importance to the programmer.
I think it was Don Park and I also like it.

> With those suggestions in
> mind, here's my current take on org.xml.sax.Parser:
>   package org.xml.sax;
>   public interface Parser {
>     public abstract void setEntityHandler (EntityHandler handler);
>     public abstract void setDocumentHandler (DocumentHandler handler);
>     public abstract void setErrorHandler (ErrorHandler handler);
>     public abstract void parse (String systemId, String publicId)
>       throws java.lang.Exception;
>     public abstract void parse (InputStream input, String encoding,
>                                 String systemId, String publicId)
>       throws java.lang.Exception;
>   }
I think Don's suggestion was also to have it like
     public abstract void parse (String systemId, String publicId, String encoding, InputStream

so that the first parameter part is always the same.
So if another constructor will be added only the the last parameter will differ.

> I haven't included a setValidate() method yet, partly because I'm not
> certain what it would really mean.  If I did
>   setValidate(false);
> would that simply prevent the reporting of validation errors, or would
> it also prohibit the parser from resolving external text entities and
> the external DTD subset?

It should have the following meaning:
- setValidate(false);
  That the document/stream should be parsed for well-formedness.
  This should also be the default if nothing was set with the setValidate() method.

- setValidate(true);
  That the document/stream should also be validated during parsing.

The question where there is exactly the border between well-formedness
parsing and validation parsing should be left to the parser. This border
can be found in the XML spec.
The SAX interface is/should be useable for both classes of XML parsers
and give also the possibility to enable/disable validation.

But I agree that it is sometimes not easy to see the clear border
between well-formedness parsing and validation parsing in the XML spec.

All the best

 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