venu        2003/11/03 03:04:33

  Modified:    java/src/org/apache/xerces/parsers AbstractDOMParser.java
  Log:
  Description : When  attribute is not declared , mark the attribute type to null.
  Refer TypeInfo interface DOM L3 core  spec.
  Dependant files : XMLDTDValidator.java
  
  Revision  Changes    Path
  1.90      +9 -4      
xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java
  
  Index: AbstractDOMParser.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- AbstractDOMParser.java    30 Jul 2003 10:30:35 -0000      1.89
  +++ AbstractDOMParser.java    3 Nov 2003 11:04:33 -0000       1.90
  @@ -966,7 +966,7 @@
                                                // DTD 
                           type = attributes.getType(i);
                                                attrImpl.setType(type);
  -                                             id = (type.equals("ID")) ? true : 
false;
  +                                             id = isIDType((String)type);
                                        }
                   
                                        if (id) {
  @@ -1059,7 +1059,7 @@
                                else {
                                        // DTD 
                                        type = attributes.getType(i);
  -                                     id = (type.equals("ID")) ? true : false;
  +                                     id = isIDType((String)type);
                                }
                   
                   // create attribute
  @@ -2390,7 +2390,7 @@
                   }
                   attr.setValue(defaultValue.toString());
                   attr.setSpecified(false);
  -                attr.setIdAttribute(type.equals("ID"));
  +                attr.setIdAttribute(isIDType(type));
   
                   // add default attribute to element definition
                   if (nsEnabled){
  @@ -2550,5 +2550,10 @@
              throw new RuntimeException();
       }
   
  +     private boolean isIDType(String type) {
  +             if ( type == null )
  +                     return false;
  +             return (type.equals("ID")) ? true : false;
  +     }
       
   } // class AbstractDOMParser
  
  
  

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

Reply via email to