String type = readAttType(acc);
HashSet values = new HashSet(); String type = readAttType(acc, values); if (validating) { if ("ID".equals(type)) {  for (Iterator i = doctype.attlistIterator(elementName); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); AttributeDecl decl = (AttributeDecl) entry.getValue(); if ("ID".equals(decl.type)) error("element types must not have more than one ID " + "attribute"); } } else if ("NOTATION".equals(type)) {  for (Iterator i = doctype.attlistIterator(elementName); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); AttributeDecl decl = (AttributeDecl) entry.getValue(); if ("NOTATION".equals(decl.type)) error("element types must not have more than one NOTATION " + "attribute"); }  ContentModel model = doctype.getElementModel(elementName); if (model != null && model.type == ContentModel.EMPTY) error("attributes of type NOTATION must not be declared on an " + "element declared EMPTY"); } }
  private void readAttDef(String elementName)    throws IOException, XMLStreamException  {    String name = readNmtoken(true);    requireWhitespace();    StringBuffer acc = new StringBuffer();    String type = readAttType(acc);    String enumer = null;    if ("ENUMERATION".equals(type) || "NOTATION".equals(type))      enumer = acc.toString();    requireWhitespace();    readDefault(elementName, name, type, enumer);  }