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

Re: Document cloneNode

From: <keshlam@us.ibm.com>
Date: Thu, 8 Oct 1998 11:20:56 -0400
To: www-dom@w3.org
Message-ID: <85256697.0053D0C7.00@us.ibm.com>
Agreed, a shallow clone of a node should't copy any of the children,
including the children which have specialized accessor methods... so
shallow clone of Document shoul have null docType and documentElement.

Note that doing deep clone of Document is a problem in DOM Level 1, since
you have to change the ownerDocument of all the duplicated nodes or it'll
throw wrong-document exceptions. In fact, this is the only function still
"broken" in my implementation -- it's not at all hard to do, I just don't
like the aesthetics of having this be the one exception to Level 1's
decision not to support copying data from one document to another.

______________________________________
Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.
Received on Thursday, 8 October 1998 11:20:50 GMT

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