private Attributes filterAttributes(Attributes attributes)
            throws SAXException {
        int len = attributes.getLength();
        for (int i = 0; i < len; i++) {
            String local = attributes.getLocalName(i);
            if (local.startsWith("aria-") && attributes.getURI(i) == ""
                    && attributes.getValue(i) == ""
                    && Arrays.binarySearch(KNOWN_ARIA_ATTRIBUTE_NAMES,
                            local) >= 0) {
                AttributesImpl attributesImpl = new AttributesImpl();
                for (int j = 0; j < i; j++) {
                    attributesImpl.addAttribute(attributes.getURI(j),
                            attributes.getLocalName(j), attributes.getQName(j),
                            attributes.getType(j), attributes.getValue(j));
                }
                for (int k = i + 1; k < len; k++) {
                    String uri = attributes.getURI(k);
                    local = attributes.getLocalName(k);
                    if (!(local.startsWith("aria-")
                            && attributes.getURI(i) == ""
                            && attributes.getValue(i) == ""
                            && Arrays.binarySearch(KNOWN_ARIA_ATTRIBUTE_NAMES,
                                    local) >= 0)) {
                        attributesImpl.addAttribute(uri, local,
                                attributes.getQName(k), attributes.getType(k),
                                attributes.getValue(k));
                    }
                }
                return attributesImpl;
            }
        }
        return attributes;
    }
@param ns
@param arg1
@param arg2
@param attributes
@throws SAXException
@see org.xml.sax.ContentHandler#startElement(java.lang.String,
     java.lang.String, java.lang.String, org.xml.sax.Attributes)
src/nu/validator/xml/ariaattributes/AriaAttributeDroppingContentHandlerWrapper.java