mrglavas    2005/09/01 13:56:22

  Modified:    java/src/org/apache/xerces/dom CoreDocumentImpl.java
  Log:
  Fixing a bug. It was possible to append a second root element or DocumentType 
node to a
  deferred DOM if the children of the deferred node have never been 
synchronized.
  
  Revision  Changes    Path
  1.87      +4 -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.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- CoreDocumentImpl.java     13 Jun 2005 21:08:07 -0000      1.86
  +++ CoreDocumentImpl.java     1 Sep 2005 20:56:22 -0000       1.87
  @@ -375,6 +375,9 @@
           // Only one such child permitted
           int type = newChild.getNodeType();
           if (errorChecking) {
  +            if (needsSyncChildren()) {
  +                synchronizeChildren();
  +            }
               if((type == Node.ELEMENT_NODE && docElement != null) ||
               (type == Node.DOCUMENT_TYPE_NODE && docType != null)) {
                   String msg = 
DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, 
"HIERARCHY_REQUEST_ERR", null);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to