@Override
    public void startElement(String uri, String localName, String qName,
            Attributes atts) throws SAXException {
        if ("http://www.w3.org/1999/xhtml" == uri) {
            if ("map" == localName) {
                String name = atts.getValue("", "name");
                if (name != null && !"".equals(name)) {
                    mapNames.add(name);
                }
            } else if ("img" == localName || "object" == localName) {
                String usemap = atts.getValue("", "usemap");
                if (usemap != null) {
                    int hashIndex = usemap.indexOf('#');
                    if ((hashIndex > -1) && (hashIndex < usemap.length() - 1)) {
                        // XXX not complaining about bad values here as
                        // the schema takes care of that.
                        String ref = usemap.substring(hashIndex + 1);
                        usemapLocationsByName.put(ref,
                                new LocatorImpl(locator));
                    }
                }
            }
        }
    }
@see nu.validator.checker.Checker#startElement(java.lang.String,
     java.lang.String, java.lang.String, org.xml.sax.Attributes)
src/nu/validator/checker/UsemapChecker.java