neeraj 2003/10/31 03:32:04
Modified: java/src/org/apache/xerces/dom CoreDocumentImpl.java
Log:
Fixing another bug. adoptNode() should not adopt nodes of entity & notation
types.
Revision Changes Path
1.47 +5 -1 xml-xerces/java/src/org/apache/xerces/dom/CoreDocumentImpl.java
Index: CoreDocumentImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/CoreDocumentImpl.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- CoreDocumentImpl.java 31 Oct 2003 11:11:46 -0000 1.46
+++ CoreDocumentImpl.java 31 Oct 2003 11:32:04 -0000 1.47
@@ -1625,7 +1625,11 @@
attr.setOwnerDocument(this);
break;
}
+ //document, entity, notation, documentype nodes can't be adopted.
+ //runtime will fall through to DocumentTypeNode
case DOCUMENT_NODE:
+ case ENTITY_NODE:
+ case NOTATION_NODE:
case DOCUMENT_TYPE_NODE: {
String msg =
DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR",
null);
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]