if ("lt".equals(name) || "gt".equals(name) || "amp".equals(name) || "apos".equals(name) || "quot".equals(name)) { return; }
  public void startEntity(String name)    throws SAXException  {    DocumentType doctype = doc.getDoctype();    if (doctype == null)      {        throw new SAXException("SAX parser error: " +                               "reference to entity in undeclared doctype");      }    if ("[dtd]".equals(name) || name.charAt(0) == '%')      {        // Ignore DTD and parameter entities        ctx = doctype;        return;      }    // Get entity    NamedNodeMap entities = doctype.getEntities();    Entity entity = (Entity) entities.getNamedItem(name);    if (entity == null)      {        throw new SAXException("SAX parser error: " +                               "reference to undeclared entity: " + name);      }    pushEntity(entity);  }