.netbiztalkisoschematronbiztalk-2013r2

What alternatives are there for ISO schematron validation in BizTalk?


Currently the existing solution contains Saxon and Java dependencies, working with xslt documents as input for validation. However, ISO Schematrons are xml files containing Schematron Schema with business rules.

Ideally, I am looking for a library to perform validation with xml message and xml schematron as input, to return validation results, preferable in xml.

Is there no such library? Are schematron not used as much? Are there support in standard .net CLR in some way?

I have tried to use https://github.com/kzu/Schematron, but it does not work as I expected, after reading about ISO standard Schematron xml files. Rules are embedded within xsd document, which is not what I want in BizTalk solution, where xsd schema validation is performed automatically.


Solution

  • I did not find any library to perform schematron validation with xml and schematron as input. And, having schematron within xsd schema is not practically duable, because most sources handle xsd and schematron schemas separately (which they should!). And, any manual work to adjust schemas is a potential problem.

    So, to be able to use standard .net components, the schematron must first be converted to xslt. I did this using "Skeleton 1.5", a library of xslt scripts to convert schematrons to different xslt formats (xslt1, xslt2, iso/saxon). Used by Saxon as we speak.

    My source of schematron specify to use xslt2, which means that I need to use BizTalk 2020 to achieve my goals. Luckily the customer is about to upgrade.