@Override
    public String getType(int index) {
        if (index < 0 || index >= attributesList.size()) {
            return null;
        }
        String type = parser.getAttributeType(elementName, getQName(index));
        if (type == null) {
            return "CDATA";
        }
        // ... use DeclHandler.attributeDecl to see enumerations
        if (type == "ENUMERATION") {
            return "NMTOKEN";
        }
        return type;
    }
<b>SAX1 AttributeList, SAX2 Attributes</b> method (don't invoke on
parser);
src/nu/validator/gnu/xml/aelfred2/SAXDriver.java