legacy/src/main/java/thredds/catalog/XMLEntityResolver.java
public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    logger.debug("  publicId="+publicId+" systemId="+systemId);
    String entity = entityHash.get( systemId);
    if (entity != null) {
      logger.debug(" *** resolved  with local copy");
      return new MyInputSource(entity);
    }

    if (systemId.contains("InvCatalog.0.6.dtd")) {
      entity = entityHash.get( "http://www.unidata.ucar.edu/schemas/thredds/InvCatalog.0.6.dtd");
      if (entity != null) {
        logger.debug(" *** resolved2 with local copy");
        return new MyInputSource(entity);
      }
    }

    logger.debug(" *** not resolved");
    return null;
  }
public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    logger.debug("  publicId="+publicId+" systemId="+systemId);
    String entity = entityHash.get( systemId);
    if (entity != null) {
      logger.debug(" *** resolved  with local copy");
      return new MyInputSource(entity);
    }

    if (systemId.contains("InvCatalog.0.6.dtd")) {
      entity = entityHash.get( "http://www.unidata.ucar.edu/schemas/thredds/InvCatalog.0.6.dtd");
      if (entity != null) {
        logger.debug(" *** resolved2 with local copy");
        return new MyInputSource(entity);
      }
    }

    logger.debug(" *** not resolved");
    return null;
  }
we read the DTD/schema locally if we can.