code: private URI resolveExtSubsetPath(String systemId) throws IOException
      {
          // Do we have a context to use for resolving?
          URL ctxt = (mInput == null) ? null : mInput.getSource();
  
          /* Ok, either got a context or not; let's create the URL based on
           * the id, and optional context:
           */
          if (ctxt == null) {
              /* Call will try to figure out if system id has the protocol
               * in it; if not, create a relative file, if it does, try to
               * resolve it.
               */
              return URLUtil.uriFromSystemId(systemId);
          }
          URL url = URLUtil.urlFromSystemId(systemId, ctxt);
          try {
              return new URI(url.toExternalForm());
          } catch (URISyntaxException e) { // should never occur...
              throw new IOException("Failed to construct URI for external subset, URL = "+url.toExternalForm()+": "+e.getMessage());
          }
      }
docs: Method called to resolve path to external DTD subset, given
  system identifier.