W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

Re: How can I put a DocumentFragment in a Document?

From: Arnaud Le Hors <lehors@us.ibm.com>
Date: Tue, 21 Nov 2000 10:15:57 -0800
Message-ID: <3A1ABBDD.672F4B04@us.ibm.com>
To: www-dom@w3.org
Claude Zervas wrote:
> 
> What I don't understand is why the concept of "owning document" in the first place, if the WG meant "owning implementation" why not say so?  It would have been much more straightforward to eliminate the owning-document constraint and instead just state that nodes must be from the same _implementation_ and hoist the node factory methods out of Document and put them in DOMImplementation.  WRONG_DOCUMENT_ERROR would be WRONG_IMPLEMENTATION_ERROR instead, or just simply let the progammer be responsible for maintaining integrity.

You're missing the fact that one implementation may support more than
one type of document and use different classes of objects depending on
the type of document being used. This is actually true with Xerces,
where the XML DOM, HTML DOM, and WML DOM all use different classes of
objects, even though there is a single implementation.

> 
> >
> >>encourages bloated implementations (Xerces 1.2 is 1.5 megs!)
> >
> >Uhm... There's a lot more to Xerces than the DOM, remember.
> 
> Yes, I was being facetious. I apologize, especially since I use Xerces quite a bit! But it is way too big for smaller client-side applications.

The error has been to put everything into the same jar. With Xerces2
we'd like to have a set of smaller jars, and the design of the parser
will allow more flexibility within the parser itself. The validator
could be left out completely for instance.

> For one, I would really like to see iterators for node traversal. I was sad to see them argued out of the level one spec and could never figure out why they didn't come back in L2.
>
> Also, an event/listener API for document/node modification notification. This is useful in MVC patterns, even on a server app. As one example, say you have a distributed cache of serialized documents (or fragments) and some controller servlets that modify some authoritative document model, any listener caches would receive notifications of the changes and refresh accordingly.

I don't understand. Both of these are addressed in DOM Level 2, as part
of Traversal, and Mutation Events.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group
Received on Tuesday, 21 November 2000 13:14:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT