xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leh...@apache.org
Subject cvs commit: xml-xerces/java/src/org/apache/xerces/parsers DOMParser.java
Date Tue, 13 Feb 2001 17:26:38 GMT
lehors      01/02/13 09:26:37

  Modified:    java/src/org/apache/xerces/parsers DOMParser.java
  Log:
  removed extra test
  
  Revision  Changes    Path
  1.39      +18 -22    xml-xerces/java/src/org/apache/xerces/parsers/DOMParser.java
  
  Index: DOMParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/DOMParser.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- DOMParser.java	2001/02/05 19:04:46	1.38
  +++ DOMParser.java	2001/02/13 17:26:35	1.39
  @@ -109,7 +109,7 @@
    * DOMParser provides a parser which produces a W3C DOM tree as its output
    *
    * 
  - * @version $Id: DOMParser.java,v 1.38 2001/02/05 19:04:46 lehors Exp $
  + * @version $Id: DOMParser.java,v 1.39 2001/02/13 17:26:35 lehors Exp $
    */
   public class DOMParser
       extends XMLParser
  @@ -1483,31 +1483,27 @@
               Node erNode = fCurrentElementNode;//fCurrentElementNode.getParentNode();
               fCurrentElementNode = erNode.getParentNode();
   
  +            // if necessary populate the related entity now
               if (fDocumentImpl != null) {
                   EntityReferenceImpl xer = (EntityReferenceImpl) erNode;
  -                // if necessary populate the related entity now
  -                if (fDocumentImpl != null) {
   
  -                    NamedNodeMap entities = fDocumentType.getEntities();
  -                    String name = fStringPool.toString(entityName);
  -                    Node entityNode = entities.getNamedItem(name);
  -
  -                    // We could simply return here if there is no entity for
  -                    // the reference or if the entity is already populated.
  -                    if (entityNode == null || entityNode.hasChildNodes()) {
  -                        return;
  -                    }
  -
  -                    EntityImpl entity = (EntityImpl) entityNode;
  -                    for (Node child = erNode.getFirstChild();
  -                         child != null;
  -                         child = child.getNextSibling()) {
  -                        Node childClone = child.cloneNode(true);
  -                        entity.appendChild(childClone);
  -                    }
  -                    entity.setReadOnly(true, true);
  +                NamedNodeMap entities = fDocumentType.getEntities();
  +                String name = fStringPool.toString(entityName);
  +                Node entityNode = entities.getNamedItem(name);
  +
  +                // simply return here if there is no entity for
  +                // the reference or if the entity is already populated.
  +                if (entityNode == null || entityNode.hasChildNodes()) {
  +                    return;
  +                }
  +
  +                EntityImpl entity = (EntityImpl) entityNode;
  +                for (Node child = erNode.getFirstChild();
  +                     child != null;
  +                     child = child.getNextSibling()) {
  +                    Node childClone = child.cloneNode(true);
  +                    entity.appendChild(childClone);
                   }
  -                xer.setReadOnly(true, true);
               }
           }
   
  
  
  

Mime
View raw message