I'm using schematron for vali开发者_开发百科dating large xml files (several megabytes). Validation is quite fast if files are ok (if there is no errors). But when the error count increases so increases the execution time of the schematron validation time.
Is there any way to stop the schematron XSLT-validation when for example 200 errors are found. That would help because if there are big files which contain hundreds of occurrences of the same error it would certainly be enough to report only first errors and ask the user to validate file again after correcting those.
You should be able to get very close to your requirement by combining the Schematron Terminator Validator with Schematron Phases
The terminator validator allows for a schematron validation to fail when the first error is hit.
Phases allow for validation to be broken up into stages and carried out progressively.
One or both of these in combination should get you close to what you want - perhaps putting all your rule classes into phases then running each phases with the terminator would give a good result, allowing users to be informated of several errors at once.
精彩评论