0
votes

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.

1
Asking for recommendations of libraries is considered of topic for Stackoverflow. Can't you use the XSLT they have in their solution in a BizTalk map? Yes, the initial validation could be against a BizTalk schema, but it sounds like they go beyond what a simple schema validation can do. See also this blog integration.team/blog/schematron-validation-biztalkDijkgraaf
Note: With BizTalk 2020, you can use later versions of XSLTDijkgraaf
@Dijkgraaf, thanks. Ended up with same solution as the link you gave. Source of schematron specify xslt2, which, then, sets the requirement of using BizTalk 2020 to use it. It was about time for BizTalk to step up from xslt1...I mean, for having XML as its preferred language...JERKER

1 Answers

0
votes

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.