Skip to main content

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: Navigate to the Validator page

In the left menu bar, click Validator.

Location of the Validator in the menu bar

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 menus on the left.

Select project and message model

Step 2: Select version

Select the desired version of the message model.

Select the desired message model version

Step 3: Select syntax

Select the syntax you want to validate. XML is the most prevalent syntax.

Syntax selection of the message model version

Step 4: Check the set of applied business rules

Below the syntax specification dropdown, the schema and additional business rule sets that apply to the message model are shown. The checkboxes of the active business rule sets are ticked by default. Users can check or uncheck boxes themselves based on their validation preference.

Schema and business rule sets selection

note

The rule sets and schema can be downloaded by clicking them.

Step 5: 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 at the top.
  • Option B: Upload your own example document (with a maximum of 16MB) by clicking ➕ Choose.
  • Option C: Paste your own XML document code in the 'edit box' below. Make sure the checkbox next to 'Show XML editor' is checked, so you can see the text box

Option A

Existing example

Option B

Upload own file

Option C

Paste and edit your own XML document

Step 6: Run validation and check the report

The Validator is now configured and ready. Click the Validate message button to start validation. After a few seconds, the validation results will appear below when the Validator is done. The positioning is below all the input items, so please scroll down if you don't see the results right away.

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.

Successful validation

XML syntax errors result in a parse error and immediately end the validation process, skipping the XML Schema and business rules validation steps.

Syntax error response

Sections 2 and 3 detail results of applying schema validation and the business rules.

Business rules error

tip

Section 4, which is not depicted here, shows detailed validation reports about the business rules validation in a technical format called Schematron Report Lanugage (SVRL) format. This can be used to get further details on the applied business rules.