@Override
    public void startElement(String uri, String localName, String name, Attributes atts)
            throws SAXException {
        String upper = localName.toUpperCase(Locale.ENGLISH);

        AttributesImpl attributes = new AttributesImpl();
        for (int i = 0; i < atts.getLength(); i++) {
            String auri = atts.getURI(i);
            String local = atts.getLocalName(i);
            String qname = atts.getQName(i);
            if (XMLConstants.NULL_NS_URI.equals(auri) &&
                    !local.equals(XMLConstants.XMLNS_ATTRIBUTE) &&
                    !qname.startsWith(XMLConstants.XMLNS_ATTRIBUTE + ":")) {
                attributes.addAttribute(auri, local, qname, atts.getType(i), atts.getValue(i));
            }
        }

        super.startElement(XMLConstants.NULL_NS_URI, upper, upper, attributes);
    }
Content handler decorator that downgrades XHTML elements to
old-style HTML elements before passing them on to the decorated
content handler. This downgrading consists of dropping all namespaces
(and namespaced attributes) and uppercasing all element names.
Used by the {@link HtmlParser} to make all incoming HTML look the same.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-html-module/src/main/java/org/apache/tika/parser/html/XHTMLDowngradeHandler.java