code: @Override
      public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
          if (validating) {
              try {
                  InputSource source = null;
                  if (publicId != null) {
                      String path = doctypeMap.get(publicId.toUpperCase());
                      source = getInputSource(path);
                  }
                  if (source == null && systemId != null) {
                      String path = doctypeMap.get(systemId.toUpperCase());
                      source = getInputSource(path);
                  }
                  return source;
              } catch (Exception e) {
                  throw new SAXException(e.toString());
              }
          } else {
              return new InputSource(new StringReader(""));
          }
      }
docs: Converts a public DTD into a local one.
  
  @param publicId unused but required by EntityResolver interface
  @param systemId the DTD that is being requested
  @return the InputSource for the DTD
  @throws SAXException if anything goes wrong