Re: The phrase: Node created by Document needs clarification

> > 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 UTC