You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Nick Sydenham <ns...@netscape.net> on 2000/03/08 18:08:29 UTC

Bug when adding DocumentFragment

According to the spec, I should be able to take a DocumentFragment from one
Document and add it to another. Unfortunately, there seems to be a bug in
com.ibm.xml.dom.NodeImpl.java around line 493:

if( !(newChild instanceof NodeImpl)
    ||
    !(newChild.getOwnerDocument() == ownerDocument ||
      // SPECIAL-CASE: Document has no owner, but may be the owner.
     ( getNodeType() == Node.DOCUMENT_NODE &&
       newChild.getOwnerDocument() == (Document)this ) 
   ) ) {
     throw new DOMExceptionImpl(DOMException.WRONG_DOCUMENT_ERR, null);
 }

i.e. there is no check for DocumentFragment, so any add will fail.

"The secret of life� is enjoying the passage of time." James Taylor

____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.