A tutorial is a wonderful thing. Learning how to write Schematron rules with a tutorial is also a wonderful thing. Unfortunately validating XML instance files against a Schematron schema is not always easy. But if it is cumbersome to work with Schematron schemas, then going through the tutorial is also no fun. XML ValidatorBuddy makes it easy to validate XML instance files against a Schematron rule set directly within XMLSpy. This enables you to focus on Schematron itself and not on how to use it.
I take the files from chapter 7 of the Schematron tutorial available at http://www.dpawson.co.uk/schematron/keys.html . Of course the method described here to create and validate the sample files can also applied on any other chapter of the tutorial.
The basic steps are:
- Select and copy the content of the Schematron schema and XML sample instance files directly from the web pages of the tutorial (with Ctrl+C).
- Create a new .sch document for the Schematron schema and a new .xml document for the sample XML in XMLSpy. Paste the file content with Ctrl+V.
- Save the files anywhere you like.
- Add a folder to the Project open in XMLSpy and put both into the new folder. ValidatorBuddy recognizes that there is a .sch file in the same project folder as the XML instance and takes this schema for Schematron validation.
- Make the .xml file the active document in XMLSpy.
- Press “Validate” on the Schematron tab of the XML ValidatorBuddy plugin window.
- Check the results

no comment until now