mrglavas 2003/11/11 08:52:36 Modified: java/src/org/apache/xerces/parsers AbstractDOMParser.java Log: I missed DefferredDOM on the last commit. Also, if the attribute wasn't declared, then there's no reason to lookup its type from XMLAttributes. Revision Changes Path 1.94 +19 -11 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.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- AbstractDOMParser.java 11 Nov 2003 15:59:42 -0000 1.93 +++ AbstractDOMParser.java 11 Nov 2003 16:52:35 -0000 1.94 @@ -966,14 +966,16 @@ } } else { - // DTD - type = attributes.getType(i); - boolean isDeclared = Boolean.TRUE.equals(attributes.getAugmentations(i).getItem(Constants.ATTRIBUTE_DECLARED)); - // For DOM Level 3 TypeInfo, the type name must - // be null if this attribute has not been declared - // in the DTD. - attrImpl.setType(isDeclared ? type : null); - id = (type.equals("ID")) ? true : false; + // DTD + boolean isDeclared = Boolean.TRUE.equals(attributes.getAugmentations(i).getItem(Constants.ATTRIBUTE_DECLARED)); + // For DOM Level 3 TypeInfo, the type name must + // be null if this attribute has not been declared + // in the DTD. + if (isDeclared) { + type = attributes.getType(i); + } + attrImpl.setType(type); + id = (type.equals("ID")) ? true : false; } if (id) { @@ -1064,8 +1066,14 @@ } } else { - // DTD - type = attributes.getType(i); + // DTD + boolean isDeclared = Boolean.TRUE.equals(attributes.getAugmentations(i).getItem(Constants.ATTRIBUTE_DECLARED)); + // For DOM Level 3 TypeInfo, the type name must + // be null if this attribute has not been declared + // in the DTD. + if (isDeclared) { + type = attributes.getType(i); + } id = (type.equals("ID")) ? true : false; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]