code: @Override
      public List<SAXParseException> validateWithErrors(final String s)
              throws SAXException, IOException {
          final Source s2 = new StreamSource(new StringReader(s));
  
          final Validator errorValidator = createNewErrorValidator();
          errorValidator.validate(s2, null);
  
          return ((Handler) errorValidator.getErrorHandler()).exceptions;
      }
docs: {@inheritDoc}