@Override
  public void endDocument() throws SAXException {
    map.clear();
    eventHandler = null;

    super.endDocument();
  }
 @Override
 public void startDocument(ValidationEventHandler eventHandler) throws SAXException {
   super.startDocument(eventHandler);
   this.eventHandler = eventHandler;
 }