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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: (untitled: DOM and SAX models)

[ Lists Home | Date Index | Thread Index ]
  • From: "David Brownell" <david-b@pacbell.net>
  • To: "Chris Harris" <christopher.harris@reuters.com>, <xml-dev@ic.ac.uk>
  • Date: Sat, 24 Jul 1999 01:50:08 -0700

----- Original Message -----
From: Chris Harris <christopher.harris@reuters.com>
To: <xml-dev@ic.ac.uk>
Sent: Wednesday, July 21, 1999 5:05 AM


> ...
>
> Validation of a document means ensuring that the document conforms
entirely
> to the DTD for that document.

Actually, it only means determining whether it conforms.  "Ensuring" is an
application's option; perhaps by choosing to reject nonconforming documents
rather than just to report nonconformance as potential trouble.


>    In practice, this means that the entire
> document has to fit into memory since validation cannot be completed until
> the whole document has been parsed. This fits well with the DOM model,

I can't see why, since DOM doesn't say a thing about validating or about
building a DOM tree from XML text, or even the relationship between DOM and
an XML processor (~= parser).  You may be assuming some particular API is
(or isn't) part of DOM -- careful!


>     but
> is somewhat in opposition to the SAX philosophy where most of the action
is
> done during the document parse.

The issue would not relate to validation, though; it'd be the architectural
issue of pipelined processing that don't impose data structure models (SAX)
or highly distinct stages segregated using one data structure (DOM).


> 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 use both. Note that the XML specification talks about the processor
as distinct from the application, so your terminology isn't quite right.
Not many people are writing XML "processors" any more; they're using ones
already written, as components of their applications.

For some reason, I tend to use validation more often with SAX than with
DOM, but that's probably just because of what I've done recently.

- Dave




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)



  • References:
    • No Subject
      • From: Chris Harris <christopher.harris@reuters.com>



 

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

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