RTEditor/src/main/java/com/onegravity/rteditor/converter/tagsoup/ElementType.java
public String namespace(String name, boolean attribute) {
        int colon = name.indexOf(':');
        if (colon == -1) {
            return attribute ? "" : theSchema.getURI();
        }
        String prefix = name.substring(0, colon);
        if (prefix.equals("xml")) {
            return "http://www.w3.org/XML/1998/namespace";
        } else {
            return ("urn:x-prefix:" + prefix).intern();
        }
    }
public String namespace(String name, boolean attribute) {
        int colon = name.indexOf(':');
        if (colon == -1) {
            return attribute ? "" : theSchema.getURI();
        }
        String prefix = name.substring(0, colon);
        if (prefix.equals("xml")) {
            return "http://www.w3.org/XML/1998/namespace";
        } else {
            return ("urn:x-prefix:" + prefix).intern();
        }
    }
public String namespace ( String name , boolean attribute ) { int colon = name . indexOf ( ' ' ) ; if ( colon == - 1 ) { return attribute ? "" : theSchema . getURI ( ) ; } String prefix = name . substring ( 0 , colon ) ; if ( prefix . equals ( "xml" ) ) { return "http://www.w3.org/XML/1998/namespace" ; } else { return ( "urn:x-prefix:" + prefix ) . intern ( ) ; } }
Return a namespace name from a Qname. The attribute flag tells us whether
to return an empty namespace name if there is no prefix, or use the
schema default instead.

@param name      The Qname
@param attribute True if name is an attribute name
@return The namespace name
Return a namespace name from a Qname . The attribute flag tells us whether to return an empty namespace name if there is no prefix or use the schema default instead .