You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by el...@apache.org on 2002/06/14 19:54:55 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/dom CoreDocumentImpl.java DOMNormalizer.java NodeImpl.java

elena       2002/06/14 10:54:55

  Modified:    java/src/org/apache/xerces/dom CoreDocumentImpl.java
                        DOMNormalizer.java NodeImpl.java
  Log:
  Minor bug fixes in normalizeDocument and lookupNamespaceURI
  
  Revision  Changes    Path
  1.22      +3 -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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- CoreDocumentImpl.java	14 Jun 2002 16:51:26 -0000	1.21
  +++ CoreDocumentImpl.java	14 Jun 2002 17:54:54 -0000	1.22
  @@ -930,6 +930,8 @@
               if (fGrammar != null) {
                   fConfiguration.setProperty(DOMValidationConfiguration.GRAMMAR_POOL, domNormalizer);
               }
  +        } else { // remove validation handler
  +                domNormalizer.setValidationHandler(null);
           }
           domNormalizer.reset(fConfiguration);
           domNormalizer.normalizeDocument(this);
  
  
  
  1.5       +3 -3      xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java
  
  Index: DOMNormalizer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DOMNormalizer.java	11 Jun 2002 17:41:24 -0000	1.4
  +++ DOMNormalizer.java	14 Jun 2002 17:54:55 -0000	1.5
  @@ -221,9 +221,9 @@
           }
           fDocument = document;
           fErrorHandler = fDocument.getErrorHandler();
  -        fValidationHandler.setBaseURI(fDocument.fDocumentURI);
           
  -        if (fValidationHandler != null) {        
  +        if (fValidationHandler != null) { 
  +            fValidationHandler.setBaseURI(fDocument.fDocumentURI);
               fValidationHandler.startDocument(null, fDocument.encoding, null);
           }
   
  
  
  
  1.54      +4 -4      xml-xerces/java/src/org/apache/xerces/dom/NodeImpl.java
  
  Index: NodeImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/NodeImpl.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- NodeImpl.java	14 Jun 2002 16:51:26 -0000	1.53
  +++ NodeImpl.java	14 Jun 2002 17:54:55 -0000	1.54
  @@ -1012,11 +1012,10 @@
        * @since DOM Level 3
        */
       public String lookupNamespaceURI(String specifiedPrefix) {
  -
           short type = this.getNodeType();
           switch (type) {
           case Node.ELEMENT_NODE : {  
  -
  +                
                   String namespace = this.getNamespaceURI();
                   String prefix = this.getPrefix();
                   if (namespace !=null) {
  @@ -1028,7 +1027,8 @@
                           // non default namespace
                           return namespace;
                       }
  -                } else if (this.hasAttributes()) {
  +                } 
  +                if (this.hasAttributes()) {
                       NamedNodeMap map = this.getAttributes();
                       int length = map.getLength();
                       for (int i=0;i<length;i++) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org