LinkedHashMap attlist = (LinkedHashMap) doctype.attlists.get(elementName); if (attlist == null) return false; return attlist.containsKey(qn);
return doctype.isAttributeDeclared(elementName, qn);
  boolean isAttributeDeclared(int index)  {    if (doctype == null)      return false;    Attribute a = (Attribute) attrs.get(index);    String qn = ("".equals(a.prefix)) ? a.localName :      a.prefix + ":" + a.localName;    String elementName = buf.toString();    LinkedHashMap attlist = (LinkedHashMap) doctype.attlists.get(elementName);    if (attlist == null)      return false;    return attlist.containsKey(qn);  }