void attribute(String qname, String value, boolean isSpecified)
            throws SAXException {
        if (!attributes) {
            attributes = true;
            if (namespaces) {
                prefixStack.pushContext();
            }
        }

        // process namespace decls immediately;
        // then maybe forget this as an attribute
        if (namespaces) {
            @SuppressWarnings("unused") int index;

            // default NS declaration?
            if (stringInterning) {
                if ("xmlns" == qname) {
                    declarePrefix("", value);
                    if (!xmlNames) {
                        return;
                    }
                }
                // NS prefix declaration?
                else if ((index = qname.indexOf(':')) == 5
                        && qname.startsWith("xmlns")) {
                    String prefix = qname.substring(6);

                    if (prefix.equals("")) {
                        fatal("missing prefix "
                                + "in namespace declaration attribute");
                    }
                    if (value.length() == 0) {
                        verror("missing URI in namespace declaration attribute: "
                                + qname);
                    } else {
                        declarePrefix(prefix, value);
                    }
                    if (!xmlNames) {
                        return;
                    }
                }
            } else {
                if ("xmlns".equals(qname)) {
                    declarePrefix("", value);
                    if (!xmlNames) {
                        return;
                    }
                }
                // NS prefix declaration?
                else if ((index = qname.indexOf(':')) == 5
                        && qname.startsWith("xmlns")) {
                    String prefix = qname.substring(6);

                    if (value.length() == 0) {
                        verror("missing URI in namespace decl attribute: "
                                + qname);
                    } else {
                        declarePrefix(prefix, value);
                    }
                    if (!xmlNames) {
                        return;
                    }
                }
            }
        }
        // remember this attribute ...
        attributeCount++;

        // attribute type comes from querying parser's DTD records
        attributesList.add(new Attribute(qname, value, isSpecified));

    }
<b>SAX2</b>: Assigns the specified property. Like SAX1 handlers, these
may be changed at any time.
src/nu/validator/gnu/xml/aelfred2/SAXDriver.java