Validator
Purpose
The purpose of the Validator is to assist organizations with the implementation of one or more information exchange standards.
For organizations, implementing an information exchange standard can be a challenging task. It requires organizations to make a mapping from their internal data structure to the data model of the standard. Only then the organization is able to generate messages from their information systems that are standard-compliant.
Getting these mappings right is seldom easy, and the resulting messages are often error-prone, at least at first. This is where the Validator comes in.
The Validator provides validation support for the syntax of use (e.g. XML and JSON), their schemas (e.g. XSD and JSON Schema), and custom business rules. Developers can select a standard, insert or upload a business document instance and run a compliance test. The result is a detailed validation report that tells the user whether their document instance violated any rules or constraints that are part of the standard.
There are two ways to use the Validator: via the Semantic Treehouse application (follow the steps below) or directly using the Validator API.
Using the Validator in a browser
The following assumes you have the appropriate access rights to use the Validator module provided by your standard development organization (SDO) and are logged in. If you do not have access or you are unsure, please contact your SDO.
Step 0: Go to the Validator page
In the browser, there are two ways to navigate to the Validator:
- On the top bar, select Support > Validator (or select Validator directly in a few Semantic Treehouse environments).
- At the Semantic Treehouse homepage, select the green checkmark icon or click the 'Validate your XML' button below.
Step 1: Select project and message model
We are now ready to configure the Validator to our wishes. Start with selecting the relevant project and message model you want to validate from the dropdown menu's on the left.
Step 2: Select version
Select the right version of the message model.
Step 3: Select syntax
Select the syntax (mostly XML and/or JSON) you want to validate.
Step 4: Provide XML document
On the right, users can now provide the file they wish to validate. There are three options:
- Option A: Select an existing example by using the dropdown menu on the top.
- Option B: Upload your own example document (with a maximum of 16MB) by selecting Choose File.
- Option C: Paste your own XML document code in the 'edit box' below.
Option A
Option B
Option C
Step 5: Check the set of applied business rules
On the bottom left, the (XML) schema and business rule sets that apply to the message model are shown. The boxes of the business rule sets that are active are ticked by default, but users can (un)check boxes themselves based on their validation purpose.
The names of the rule sets are hyperlinks, so users can download the schematron file for reuse or further inspection.
Step 6: Run validation and check the report
The Validator is now configured and ready. Click on the Validate message button to start validation. After a few seconds the validation results will appear below when the Validator is done.
In our example below the results confirm the validity of the XML syntax (1), compliance to the XML Schema (2), and adherence to the applied business rules.
XML syntax errors result in a ParseError and immediately ends the validation process, skipping the XML Schema and business rules validation steps entirely.
If errors are found for the last two validation criteria, the validation report below will show in detail what exactly is wrong with the errors.
If you want a detailed validation report formatted in Schematron Validation Report Lanugage (SVRL) format, select Show/hide detailed validation result on the bottom of the window.