I searched for some packages but with no luck. Is there such a package that validates the xml file against a .sch file? For .Net Framework or .Net Core?
Asked
Active
Viewed 384 times
0
-
XMLReader has options to validate. See XMLReaderSettings : https://learn.microsoft.com/en-us/dotnet/api/system.xml.xmlreadersettings?force_isolation=true&view=net-6.0 – jdweng Jul 20 '22 at 13:39
-
https://stackoverflow.com/questions/24759417/validating-xml-with-schematron – Yitzhak Khabinsky Jul 20 '22 at 13:46
-
Schematron is often implemented using XSLT and the existing XSLT based Schematron implementations like Schxslt can certainly be run under the .NET framework using Saxon HE from NuGet or even with .NET Core, but there the current hurdle is that SaxonCS is a commercial product so you can explore it under a trial license but would need to buy a license if you need to use it further on. XmlPrime is another commercial XSLT 2 option for .NET framework and .NET Core probably able to run XSLT 2 based implementations of Schematron. Don't know whether UBL perhaps even only requires XSLT 1. – Martin Honnen Jul 22 '22 at 13:49