Streams, protocols, documents and fragments

Marcelo Cantos marcelo at mds.rmit.edu.au
Mon Mar 1 02:13:44 GMT 1999


On Fri, Feb 26, 1999 at 08:04:40AM -0800, Tom Harding wrote:
> David Megginson wrote:
> 
> > -- a general-purpose DOM would be *extremely* inefficient for
> > handling things like vector graphics or 3D worlds (to name only
> > two), though it is always possible to expose their optimised
> > object models through a DOM interface later if necessary.
> 
> In lots of applications, the data can't stay in an XML
> representation for very long anyway, because of what you're
> integrating it with/displaying it on/routing it through/converting
> it to/storing it in/etc... I view the DOM as a standard, OO way of
> manipulating the contents of a document.  It lets applications get
> work done, even without taking an end-to-end OO approach.  Perhaps
> I'm showing my bias here ;D

It's the translation process that hits hardest, however.  C and
FORTRAN compilers rarely build parse trees, because it is much more
efficient to generate code directly from token streams.  What you seem
to be suggesting is that a parser should pump an event stream straight
into DOM and then into another domain-specific structure.  This is
just adding an often gratuitous layer that can incur a massive
performance penalty for large documents (a 3D model of a refinery,
say).

In such circumstances I would much rather build the domain-specific
structure straight from the event stream.  (In fact, I have serious
reservations about using XML at all for 3D model transmission and
storage -- the markup tends to grossly outweigh the content, which
consists primarily of numbers.  Compression during transport _and_
storage would be a must).


Cheers,
Marcelo

-- 
http://www.simdb.com/~marcelo/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at 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 at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list