W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2000

Re: Copying a node from one doc to another

From: <keshlam@us.ibm.com>
Date: Tue, 14 Mar 2000 16:18:48 -0500
To: DOM <www-dom@w3.org>
Message-ID: <852568A2.0075139A.00@D51MTA03.pok.ibm.com>
> Since you're using Sun's DOM, you should be able to use the
>     DocumentEx.changeNodeOwner (Node)
> I like that better than the DOM L2 approach of
>     Document.importNode (Node)

We did consider this alternative. A problem arose when we started looking
at the HTML DOM and some other proposed usecases, precisely because they
_might_ have subclass-specific per-instances data. In the HTML DOM that
includes Objects, Applets, scripts, etc. It wasn't clear what the
interaction with those should be (does the applet continue running, does
its context change, and if so how do we inform it of those changes), and it
wasn't clear how to make the behavior when moving across implementations
(or subclasses of implementations) consistant with moving within an
implementation, so we went with a clone-analogy rather than a move-analogy.

There's a proposal on the table to introduce something more like move in
DOM Level 3. It might still be a clone-and-discard if you're crossing
implementations boundaries, but it would provide an opportunity for
optimization in those cases where the DOM can recognize a compabable node.
I haven't seen a description of how the above issues are to be addressed,
so I have no guess about whether it'll fly or not.


______________________________________
Joe Kesselman  / IBM Research
Received on Tuesday, 14 March 2000 16:19:55 GMT

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