RTEditor/src/main/java/com/onegravity/rteditor/converter/tagsoup/ElementType.java
public void setAttribute(AttributesImpl atts, String name, String type,
                             String value) {
        if (name.equals("xmlns") || name.startsWith("xmlns:")) {
            return;
        }
        ;
        String namespace = namespace(name, true);
        String localName = localName(name);
        int i = atts.getIndex(name);
        if (i == -1) {
            name = name.intern();
            if (type == null)
                type = "CDATA";
            if (!type.equals("CDATA"))
                value = normalize(value);
            atts.addAttribute(namespace, localName, name, type, value);
        } else {
            if (type == null)
                type = atts.getType(i);
            if (!type.equals("CDATA"))
                value = normalize(value);
            atts.setAttribute(i, namespace, localName, name, type, value);
        }
    }
public void setAttribute(AttributesImpl atts, String name, String type,
                             String value) {
        if (name.equals("xmlns") || name.startsWith("xmlns:")) {
            return;
        }
        ;
        String namespace = namespace(name, true);
        String localName = localName(name);
        int i = atts.getIndex(name);
        if (i == -1) {
            name = name.intern();
            if (type == null)
                type = "CDATA";
            if (!type.equals("CDATA"))
                value = normalize(value);
            atts.addAttribute(namespace, localName, name, type, value);
        } else {
            if (type == null)
                type = atts.getType(i);
            if (!type.equals("CDATA"))
                value = normalize(value);
            atts.setAttribute(i, namespace, localName, name, type, value);
        }
    }
public void setAttribute ( AttributesImpl atts , String name , String type , String value ) { if ( name . equals ( "xmlns" ) || name . startsWith ( "xmlns:" ) ) { return ; } ; String namespace = namespace ( name , true ) ; String localName = localName ( name ) ; int i = atts . getIndex ( name ) ; if ( i == - 1 ) { name = name . intern ( ) ; if ( type == null ) type = "CDATA" ; if ( ! type . equals ( "CDATA" ) ) value = normalize ( value ) ; atts . addAttribute ( namespace , localName , name , type , value ) ; } else { if ( type == null ) type = atts . getType ( i ) ; if ( ! type . equals ( "CDATA" ) ) value = normalize ( value ) ; atts . setAttribute ( i , namespace , localName , name , type , value ) ; } }
Sets an attribute and its value into an AttributesImpl object. Attempts
to set a namespace declaration are ignored.

@param atts  The AttributesImpl object
@param name  The name (Qname) of the attribute
@param type  The type of the attribute
@param value The value of the attribute
Sets an attribute and its value into an AttributesImpl object . Attempts to set a namespace declaration are ignored .