×
Menu

Schematron validation in XMLSpy

®
 
The XML ValidatorBuddy XMLSpy® plugin provides easy access to Schematron validation in XMLSpy®. There is no need to create a command-line batch file or to use any other complicated tool. Just assign a Schematron schema and validate your XML instance files completely in the XML editor.
 
Assigning a Schematron Schema
 
The XML ValidatorBuddy plugin supports two methods to assign a Schematron Schema to an XML instance file:
 
1. Processing Instruction
A reference to a Schematron Schema can be provided by adding a Processing Instruction to the XML. The name of the Processing Instruction has to be valbuddy_schematron and the data is either an absolute or relative path to the .sch file. Example:
<?valbuddy_schematron using_report_element.sch?>
 
2. Project folder
If the XML document is part of the currently open Project a Schematron Schema can be provided by adding the .sch file to the same Project folder.
 
Schema Selector
 
The Schema Selector shows the associated Schematron .sch files and can be used to select which Schema will be used for validation. To update the list of Schema files use the button on the right side.
 
Open Schematron schema
 
Use this button to open the currently selected Schematron schema in XMLSpy® as new document. You can then modify the schema and check the validation again directly in the editor.
 
Validation
 
On clicking the Validate button the Schematron validation is started against the selected Schema file. If the Schema Selector is not filled XML ValidatorBuddy will search for any associated Schema files and takes the first Schema found for validation.
 
Advanced Functionality
 
Schematron validation uses XSLT transformations to validate the XML instance file. The "Get XSLT" button creates a new .xsl document in XMLSpy® which contains the stylesheet transformed from the currently selected Schematron Schema. You can use this for advanced debugging in the built-in debugger of XMLSpy®.
 
Copyright © 2015 by xml-buddy.com. All Rights Reserved.