Subject: | Schematron can not be used to validate different schemas in a single script |
The SchematronReader package uses several package variable to store state while parsing the schema. This would probably be okay except that the @tests variable is not reset after the parse finishes. So if you try to create a new Schematron object which uses a different schema, you will get all of the tests from the previous schema and your new tests.
I was able to work around the problem by reseting @Schematron::tests in my script.
@SchematronReader::tests = ();
This exists in Schematron version 0.98. I am running on Redhat Linux.