void setElement(String name, int contentType, String contentModel,
            Hashtable attributes) throws java.lang.Exception
    {
        Object element[];

        // Try looking up the element
        element = (Object[]) elementInfo.get(name);

        // Make a new one if necessary.
        if (element == null) {
            element = new Object[3];
            element[0] = new Integer(CONTENT_UNDECLARED);
            element[1] = null;
            element[2] = null;
        } else if (contentType != CONTENT_UNDECLARED
                && ((Integer) element[0]).intValue() != CONTENT_UNDECLARED) {
            error("multiple declarations for element type", name, null);
            return;
        }

        // Insert the content type, if any.
        if (contentType != CONTENT_UNDECLARED) {
            element[0] = new Integer(contentType);
        }

        // Insert the content model, if any.
        if (contentModel != null) {
            element[1] = contentModel;
        }

        // Insert the attributes, if any.
        if (attributes != null) {
            element[2] = attributes;
        }

        // Save the element info.
        elementInfo.put(name, element);
    }