Bilby

Validation of LIXI 2 messages using Schematron (using Python, JAVA, or C#)

Validation of LIXI2 messages using Schematron
(with Python, JAVA, or C#)

Posted on: May 29, 2020


LIXI2 is excellent for enforcing consistency and conformance of the structure of an electronic message. Schematron gives us an excellent way to take this a step further and validate more complicated logic. Examples might include a check for internal consistency, such as "If an address is in Australia, then the Australian State attribute is mandatory". More complex rules can be implemented, such as "If the product code is 'ABC', then the applicant that is flagged as the primary applicant must provide a residential address that is in NSW".

Another benefit of using Schematron rules is that it allows you to collaborate with your integration partner on the ruleset that defines a valid message. Rather than writing a requirements document that needs a human to interpret in order to develop code and to test, you can use the Schematron document itself to both describe the rules for the developer and use the same file to test the result of that development.

what is schematron? A language for making assertions about the presence or absence of patterns in XML documents.
 

what is schematron used for? Business rules validation, data reporting, general validation, quality control, quality assurance, firewalling, filtering, constraint checking, naming and design rules checking, statistical consistency, data exploration, transformation testing, feature extraction, house-style-rules checking
 

what makes schematron unique? Schematron is very simple (only five important elements), very powerful (it can express many kinds of constraints impossible in other schema languages), very diverse (it can be used for business rules, reports as well as the kinds of static constraints usually associated with schemas.)
 
- schematron.com
 

We have now published blog posts showing how to evaluate a LIXI2 message against Schematron rules in three different programming languages: Python, Java/Eclipse, and C#/.NET. Read the blogs here ...

gavel

This blog post shows how you to execute Schematron validation of LIXI2 messages in Python using the LIXI Python Package.

sun

This blog post shows how you to use Java and Eclipse to execute Schematron validation using using a generic XSLT engine to execute an XSL transformation.

cloud

This blog post shows how you to execute Schematron validation using C# and .NET.


Written by:
Shane Rigby, LIXI Limited CEO
First Published: May 29, 2020