private void setElement(String name, int contentType, String contentModel,
            HashMap<String, AttributeDecl> attributes) throws SAXException {
        if (skippedPE) {
            return;
        }

        ElementDecl element = elementInfo.get(name);

        // first <!ELEMENT ...> or <!ATTLIST ...> for this type?
        if (element == null) {
            element = new ElementDecl();
            element.contentType = contentType;
            element.contentModel = contentModel;
            element.attributes = attributes;
            elementInfo.put(name, element);
            return;
        }

        // <!ELEMENT ...> declaration?
        if (contentType != CONTENT_UNDECLARED) {
            // ... following an associated <!ATTLIST ...>
            if (element.contentType == CONTENT_UNDECLARED) {
                element.contentType = contentType;
                element.contentModel = contentModel;
            } else {
                // VC: Unique Element Type Declaration
                handler.verror("multiple declarations for element type: "
                        + name);
            }
        }

        // first <!ATTLIST ...>, before <!ELEMENT ...> ?
        else if (attributes != null) {
            element.attributes = attributes;
        }
    }
Register an element. Array format: [0] element type name [1] content
model (mixed, elements only) [2] attribute hash table
src/nu/validator/gnu/xml/aelfred2/XmlParser.java