{
        String resourceURI = resource.getURI().toString();
        inputSource.setPublicId(resourceURI);
        inputSource.setSystemId(resourceURI);
        inputSource.setEncoding(resource.getEncoding());
      }