private XSModel getXSModel(String... files) {
    myFixture.configureByFiles(files);

    XmlFile file = (XmlFile) myFixture.getFile();
    ValidateXmlActionHandler handler =
        new ValidateXmlActionHandler(false) {
          @Override
          protected SAXParser createParser() throws SAXException, ParserConfigurationException {
            SAXParser parser = super.createParser();
            parser
                .getXMLReader()
                .setFeature(
                    Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE,
                    true);
            return parser;
          }
        };
    handler.setErrorReporter(handler.new TestErrorReporter());
    handler.doValidate(file);
    XMLGrammarPool grammarPool = ValidateXmlActionHandler.getGrammarPool(file);
    assert grammarPool != null;
    Grammar[] grammars = grammarPool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA);
    XSGrammar grammar = (XSGrammar) grammars[0];
    return grammar.toXSModel();
  }