private void setAttribute(String elName, String name, String type,
            String enumeration, String value, int valueType) throws Exception {
        HashMap<String, AttributeDecl> attlist;

        if (skippedPE) {
            return;
        }

        // Create a new hashtable if necessary.
        attlist = getElementAttributes(elName);
        if (attlist == null) {
            attlist = new HashMap<>();
        }

        // ignore multiple attribute declarations!
        if (attlist.get(name) != null) {
            // warn ...
            return;
        } else {
            AttributeDecl attribute = new AttributeDecl();
            attribute.type = type;
            attribute.value = value;
            attribute.valueType = valueType;
            attribute.enumeration = enumeration;
            attlist.put(name, attribute);

            // save; but don't overwrite any existing <!ELEMENT ...>
            setElement(elName, CONTENT_UNDECLARED, null, attlist);
        }
    }
Register an attribute declaration for later retrieval. Format: - String
type - String default value - int value type - enumeration - processed
default value
src/nu/validator/gnu/xml/aelfred2/XmlParser.java