Bug 4960 - cloneNode(Document) is broken again in 1.4.4
Summary: cloneNode(Document) is broken again in 1.4.4
Status: NEW
Alias: None
Product: Xerces-J
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: All All
: P3 major
Target Milestone: ---
Assignee: Xerces-J Developers Mailing List
URL: http://www.ibiblio.org/xml/XInclude
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-19 16:38 UTC by elharo
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description elharo 2001-11-19 16:38:38 UTC
The cloneNode(Document) method broke in Xerces-J 1.4.4. It had been working in
1.4.3 through 1.4.0. The same problem occurred in 1.3.1 and earlier. This
affects my XInclude processor and anybody else who needs to clone a document.

org.w3c.dom.DOMException: Node type being imported is not supported
        at org.apache.xerces.dom.CoreDocumentImpl.importNode(CoreDocumentImpl.ja
va:1051)
        at org.apache.xerces.dom.CoreDocumentImpl.cloneNode(CoreDocumentImpl.jav
a:348)
        at org.apache.xerces.dom.DocumentImpl.cloneNode(DocumentImpl.java:202)
        at com.macfaq.xml.DOMXIncluder.resolve(src/com/macfaq/xml/DOMXIncluder.j
ava:121)
        at com.macfaq.xml.DOMXIncluder.main(src/com/macfaq/xml/DOMXIncluder.java
:512)
Comment 1 Bui 2002-01-16 14:39:26 UTC
I got the same DOMException when deep cloning document with xerces-j 1.4.4 in 
xalanj 2.2.D14.
-----
org.w3c.dom.DOMException: Node type being imported is not supported
	at org.apache.xerces.dom.CoreDocumentImpl.importNode
(CoreDocumentImpl.java:1051)
	at org.apache.xerces.dom.CoreDocumentImpl.cloneNode
(CoreDocumentImpl.java:348)
	at org.apache.xerces.dom.DocumentImpl.cloneNode(DocumentImpl.java:202)
	at 
com.ericsson.pcore.pcpres.requestbroker.impl.DefaultRequestBroker.processApplica
tionData(DefaultRequestBroker.java)
Comment 2 vic 2002-05-27 08:49:59 UTC
I have same problem for clone this Document:

<?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE root [
 <!ENTITY copyright "Copyright">
]>
<root>
 <item title="&copyright;"/>
</root>

===================
DOMParser parser = new DOMParser();
parser.setFeature("http://xml.org/sax/features/validation", false);
parser.setFeature("http://xml.org/sax/features/namespaces", true);
parser.setFeature("http://xml.org/sax/features/external-general-entities", true);
parser.setFeature("http://xml.org/sax/features/external-parameter-entities", true);
parser.setFeature("http://apache.org/xml/features/validation/dynamic", true); 
parser.setFeature("http://apache.org/xml/features/validation/warn-on-duplicate-attdef",false);
parser.setFeature("http://apache.org/xml/features/validation/warn-on-undeclared-elemdef",false);