[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

  • From: Juergen Modre <jmodre@e...>
  • To: David Megginson <ak117@f...>, xml-dev Mailing List <xml-dev@i...>
  • Date: Wed, 25 Feb 1998 16:10:01 +0000

sax disable validation
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
input)

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
 Juergen

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

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

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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.