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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: validation, SAX and DOM

[ Lists Home | Date Index | Thread Index ]
  • From: Kay Michael <Michael.Kay@icl.com>
  • To: "'Chris Harris'" <christopher.harris@reuters.com>, xml-dev@ic.ac.uk
  • Date: Wed, 21 Jul 1999 15:36:36 +0100

> My question is really, for those of you who are writing XML processors
> (i.e. applications that use XML), what mode(s) do you use, 
> and do you find the need for a validating SAX parser? 

I have to say that I use both modes and I have not yet found much need for a
validating parser of either kind. This is because either (a) I trust the
software that wrote the XML to write valid documents, or (b) I don't trust
it, in which case I invariably need to validate incoming documents against
constraints that I cannot express in a DTD.

It doesn't help that neither SAX nor DOM allows the application to discover
whether validation has been done or not; that XML allows some of the
constraints expressed in a DTD to be overridden in the document instance;
that it's quite difficult to check in my application that the DTD used for
validation was 'the right one'; and with SAX, there is no guarantee of when
validation is done, for example it might give me duplicate ID values and
only report the error at endDocument() time. All these difficulties have led
me in real applications to do full validation at application level and not
trust the parser to do it for me.

Mike Kay

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/ and on CD-ROM/ISBN 981-02-3594-1
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