private void expandEntity(String name)
private void expandEntity(String name, boolean inAttr)
  private void expandEntity(String name)    throws IOException, XMLStreamException  {    if (doctype != null)      {        Object value = doctype.entities.get(name);        if (value != null)          {            if (value instanceof String)              pushInput(name, (String) value);            else              pushInput(name, (ExternalIds) value);            if (name != null)              startEntityStack.addFirst(name);            return;          }      }    error("Reference to undeclared entity", name);  }