code: static InputSource createInputSource(Identifier id, Input input) {
      InputSource inputSource = createInputSource(input);
      if (id instanceof ExternalIdentifier)
        inputSource.setPublicId(((ExternalIdentifier)id).getPublicId());
      if (inputSource.getSystemId() == null)
        inputSource.setSystemId(getSystemId(id));
      return inputSource;
    }
docs: precondition: input.isResolved()