else { for (Iterator j = attrs.iterator(); j.hasNext(); ) { Attribute a = (Attribute) j.next(); if (attName.equals(a.name)) continue; } }
else if (attributeSpecified(attName)) continue;
  private int readStartElement()    throws IOException, XMLStreamException  {    //System.err.println("readStartElement");    // Read element name    String elementName = readNmtoken(true);    attrs.clear();    // Push namespace context    if (namespaceAware)      namespaces.addFirst(new LinkedHashMap());    // Read element content    boolean white = tryWhitespace();    mark(1);    char c = readCh();    while (c != '/' && c != '>')      {        // Read attribute        reset();        if (!white)          error("need whitespace between attributes");        readAttribute(elementName);        white = tryWhitespace();        mark(1);        c = readCh();      }    // supply defaulted attributes    if (doctype != null)      {        LinkedHashMap attlist =          (LinkedHashMap) doctype.attlists.get(elementName);        if (attlist != null)          {            for (Iterator i = attlist.entrySet().iterator(); i.hasNext(); )              {                Map.Entry entry = (Map.Entry) i.next();                String attName = (String) entry.getKey();                if (namespaceAware && attName.equals("xmlns"))                  {                    LinkedHashMap ctx =                      (LinkedHashMap) namespaces.getFirst();                    if (ctx.containsKey(XMLConstants.DEFAULT_NS_PREFIX))                      continue; // namespace was specified                  }                else if (namespaceAware && attName.startsWith("xmlns:"))                  {                    LinkedHashMap ctx =                      (LinkedHashMap) namespaces.getFirst();                    if (ctx.containsKey(attName.substring(6)))                      continue; // namespace was specified                  }                else                  {                    for (Iterator j = attrs.iterator(); j.hasNext(); )                      {                        Attribute a = (Attribute) j.next();                        if (attName.equals(a.name))                          continue; // attribute was specified                      }                  }                AttributeDecl decl = (AttributeDecl) entry.getValue();                if (decl.value == null)                  continue;                Attribute attr =                  new Attribute(attName, decl.type, false, decl.value);                if (namespaceAware)                  {                    if (!addNamespace(attr))                      attrs.add(attr);                  }                else                  attrs.add(attr);              }          }      }    if (baseAware)      {        String base = getAttributeValue(XMLConstants.XML_NS_URI, "base");        bases.addFirst(base);      }    // make element name available for read    buf.setLength(0);    buf.append(elementName);    switch (c)      {      case '>':        // push element onto stack        stack.addLast(elementName);        return CONTENT;      case '/':        require('>');        return EMPTY_ELEMENT;      }    return -1; // to satisfy compiler  }