You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Randall Theobald <ra...@us.ibm.com> on 2005/10/20 21:03:38 UTC
cloning doctype element in HTMLDocumentImpl
Calling org.apache.html.dom.HTMLDocumentImpl.cloneNode(true) when it
contains a <!doctype ...> element results in a DOMException being thrown
from org.apache.xerces.dom.CoreDocumentImpl.importNode(...).
CoreDocumentImpl uses a private importNode(...) method to do the cloning,
which takes a flag of whether a cloning operation is taking place. There
is a disconnect going from the HTMLDocumentImpl.cloneNode() call to the
importNode call since the importNode method 'isCloning' flag is false,
which causes the importing of a DOCUMENT node type to fail.
Is this a known problem? I ran into it while using HttpUnit.
thanks,
Randall Theobald
Staff Software Engineer, Austin, TX
IBM WebSphere Process Server Development
(512) 838-9349, t/l: 678-9349
randallt@us.ibm.com