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

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

From: Claude Zervas <claude@utlco.com>
Date: Mon, 20 Nov 2000 19:15:04 -0800
Message-Id: <4.1.20001120184928.00a94f58@mail.blarg.net>
To: <www-dom@w3.org>
At 09:32 AM 11/20/2000 , Joseph Kesselman wrote:
>... Remember that nodes belong to
>specific Documents, and may only be appended to that Document. If the
>DocumentFragment was created as part of one Document, you can _not_
>directly append its contents to another Document...

This is a very unfortunate design constraint that makes caching document fragments in a templating environment fairly inefficient. It usually requires a lot of needless node cloning in most DOM implementations.

I think this is just one of the many problems with the DOM that came from its browser/scripting heritage (such as Node.previous/nextSibling()) that warrants a better specification for efficient server-side use. The current spec also encourages bloated implementations (Xerces 1.2 is 1.5 megs!), which make them difficult to use in slim client apps or applets.
I recall that there where a number of people on the early DOM 1.0 lists that where in favor of creating a parallel spec for server-side or thin-client applications. If anybody would like to participate please let me know and perhaps we could start an "Alternate DOM" working group. JDOM has been doing something similar, but it is Java-centric.

Claude Zervas
Received on Monday, 20 November 2000 22:14:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC