mrglavas 2003/11/11 07:59:42 Modified: java/src/org/apache/xerces/parsers AbstractDOMParser.java Log: For DOM Level 3 TypeInfo, if an attribute was not declared in the DTD, its type name is null. Using new augmentations property "ATTRIBUTE_DECLARED" to propogate this information to the DOM Attr. http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107/core.html#TypeInfo-typeName Revision Changes Path 1.93 +6 -2 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.92 retrieving revision 1.93 diff -u -r1.92 -r1.93 --- AbstractDOMParser.java 7 Nov 2003 00:20:41 -0000 1.92 +++ AbstractDOMParser.java 11 Nov 2003 15:59:42 -0000 1.93 @@ -968,7 +968,11 @@ else { // DTD type = attributes.getType(i); - attrImpl.setType(type); + 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; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]