else { if (attrs.contains(attr))
else if (attrs.contains(attr))
  private void readAttribute(String elementName)    throws IOException, XMLStreamException  {    //System.err.println("readAttribute");    // Read attribute name    String attributeName = readNmtoken(true);    String type = getAttributeType(elementName, attributeName);    readEq();    // Read literal    final int flags = LIT_ATTRIBUTE |  LIT_ENTITY_REF;    String value = (type == null || "CDATA".equals(type)) ?      readLiteral(flags) : readLiteral(flags | LIT_NORMALIZE);    // add attribute event    Attribute attr = this.new Attribute(attributeName, type, true, value);    if (namespaceAware && attributeName.equals("xmlns"))      {        LinkedHashMap ctx = (LinkedHashMap) namespaces.getFirst();        if (ctx.containsKey(XMLConstants.DEFAULT_NS_PREFIX))          error("duplicate default namespace");      }    else if (namespaceAware && attributeName.startsWith("xmlns:"))      {        LinkedHashMap ctx = (LinkedHashMap) namespaces.getFirst();        if (ctx.containsKey(attributeName.substring(6)))          error("duplicate namespace", attributeName.substring(6));      }    else      {        if (attrs.contains(attr))          error("duplicate attribute", attributeName);      }    if (namespaceAware)      {        if (!addNamespace(attr))          attrs.add(attr);      }    else      attrs.add(attr);  }