code: @SuppressWarnings("resource")
      protected XMLValidationSchema doCreateSchema
          (ReaderConfig rcfg, InputBootstrapper bs, String publicId, String systemIdStr, URL ctxt)
          throws XMLStreamException
      {
          try {
              Reader r = bs.bootstrapInput(rcfg, false, XmlConsts.XML_V_UNKNOWN);
              if (bs.declaredXml11()) {
                  rcfg.enableXml11(true);
              }
              if (ctxt == null) { // this is just needed as context for param entity expansion
                  ctxt = URLUtil.urlFromCurrentDir();
              }
              /* Note: need to pass unknown for 'xmlVersion' here (as well as
               * above for bootstrapping), since this is assumed to be the main
               * level parsed document and no xml version compatibility checks
               * should be done.
               */
              SystemId systemId = SystemId.construct(systemIdStr, ctxt);
              WstxInputSource src = InputSourceFactory.constructEntitySource
                  (rcfg, null, null, bs, publicId, systemId, XmlConsts.XML_V_UNKNOWN, r);
  
              /* true -> yes, fully construct for validation
               * (does not mean it has to be used for validation, but required
               * if it is to be used for that purpose)
               */
              return FullDTDReader.readExternalSubset(src, rcfg, /*int.subset*/null, true, bs.getDeclaredVersion());
          } catch (IOException ioe) {
              throw new WstxIOException(ioe);
          }
      }
docs: The main validator construction method, called by all externally
  visible methods.