Rick Jelliffe did a minor update to the current ISO Schematron implementations. Please download them here: http://www.schematron.com/implementation.html
Briefly the changes are:
- A fix for running EXSLT Schematron.
- New parameter “terminate” to stop validation on the first failed assert.
- A new version of the Schematron ANT task is also available.
Schematron
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
After doing this the Schematron tab shows the following result:

Schematron tutorial chapter 7 result
Schematron, ValidatorBuddy, xmlspy
Here is a summary of the changes in XML ValidatorBuddy 2.6:
Copy validation report in XMLSpy as XML
In the past it was not possible to access the validation report in the XMLSpy plugin for further processing beside scrolling through the error list and selecting the error location. Now the Schematron and Xerces tab are providing a button to copy the validation results as a new XML document in XMLSpy. The XML has the same structure as the log file generated by a batch validation.
Validate instance files with selected Schema
Validation from the Windows File Explorer supports a new command to validate one or multiple XML instance files against a selected schema file. This command overwrites any present xsi:SchemaLocation or xsi:NoNamespaceSchemaLocation. If no schema location attribute is in the XML root element the schema is loaded as NoNamespaceSchemaLocation. This functionality uses the Xerces SAX validator and is therefore also handy on validating huge files without any schema already assigned.
Creation of batch log in UTF-8
The batch log file is now written in UTF-8 encoding. The UTF-16 format without a BOM which was used in the past caused some problems on reading. Several people requested to change this to UTF-8. Of course this is the better choice anyways.
ValidatorBuddy, Xerces-C, xmlspy
Today I read by chance a post in the oXygen XML editor forum (here) if it is possible to get the XSL which is used in the last step of Schematron validation to validate the XML instance. To make it short: in oXygen there is no special functionality for it, with ValidatorBuddy in XMLSpy you get it with one click.
Some background: Usually, to validate a XML instance document using Schematron a XSL stylesheet which is generated from the Schematron schema is applied to the input XML. To generate the XSL to validate the XML another XSL stylesheet that implements the Schematron definition is used. In addition you also need to do some pre-processing to resolve the includes at least. Guess what, this is also done with the help of a stylesheet.
To simplify this for the user and to save time XML ValidatorBuddy has a button to get the final XSL used to validate the XML with one click:

Get XSLT button for Schematron
On the upper-right corner you can see the “Get XSLT” button. If a Schematron stylesheet is assigned to the XML a new .xsl document will be created in XMLSpy with the stylesheet to validate any instance document.
You can then save this stylesheet and apply it to any XML with simple XSL transformation or you can use it to debug the Schematron schema in the built-in debugger of XMLSpy.
Schematron, ValidatorBuddy, xmlspy, XSL