You can remove entity declarations from the internal DTD subset:
Remove the declaration of an internal entity
You can remove the declaration of an internal entity if there are no references to this entity.
Remove the declaration of an external entity
You can remove the declaration of an external entity if there are no references to this entity in the document.