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

Re: The phrase: Node created by Document needs clarification

From: David Brownell <david-b@pacbell.net>
Date: Wed, 29 Aug 2001 23:05:07 -0700
To: www-dom@w3.org
Message-id: <083201c13119$b8d51400$6800000a@brownell.org>
> > 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()
> 
> Xerces knows that any node object that was created by the document (either
> through a call to a document create* method or returned by a public method)
> will implement NodeImpl and instanceOf NodeImpl is false, it is certain that
> the node was not created by the document but is from another implementation.

Any DOM has the same type of requirement.  The issue is that there are
behaviors required by the DOM spec that can't be implemented in terms
of the public APIs.  Well known to any implementor.  It complicates the
task of testing, too, since triggering the behaviors (creating readonly nodes,
as one example) also requires behaviors out of scope of the spec.


> The public interfaces do not attempt to interfaces that would allow you to
> provide your own implementation of Node.

Would it be a Good Thing if the public interfaces were sufficient
for such purposes -- both implementation and testing?

- Dave
Received on Thursday, 30 August 2001 02:06:37 GMT

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