W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2001

The phrase: Node created by Document needs clarification

From: Sergey Smirnov <ssmirnov@marketswitch.com>
Date: Tue, 28 Aug 2001 18:44:05 -0400 (EDT)
Message-ID: <000701c13012$a522cb30$8404a8c0@marketswitch.com>
To: <www-dom@w3.org>

Methods: appendChild, insertBefore etc.
     WRONG_DOCUMENT_ERR: Raised if newChild was created
     from a different document than the one that created this node.

Does it explicitly  mean that  the following condition:
(parentNode.ownerDocument  == newChild.ownerDocument)
is the ONLY condition that proves  that  parent and child node were created
from the same  document.

In other words, may it be any other hidden conditions that do not belong to
the www.w3.org DOM Level 2 specification
but the concrete implementation of DOM uses to check whether a newChild was in
fact created from this Document

For example:
XERCES 1.2 and 2.0 demands that newChild  was an instance of the class
NodeImpl, otherwise
newChild can not be appended to the parent node even if
parentNode.getOwnerDocument()  == newChild.getOwnerDocument()

Is it correct in terms of DOM specification?

Thank you,
Sergey Smirnov
ssmirnov@marketswitch.com
snsmirnov@hotmail.com
Received on Wednesday, 29 August 2001 12:38:10 GMT

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