I am starting with Peppol Invoices based on XML. What I need is to be able to locally validate the XML of the invoice document. (I know that on-line validators do exist.) The next step will be the validation using the Schematron language -- and that requires XSLT 2.0. As Windows environment (without Java) is likely to be used, I have chosen XmlPrime tools -- their xslt.exe.
To avoid fiddling with paths, I have put all the needed .xsd files, and also the invoice.xml file to the same directory:
Looking at their reference page (https://www.xmlprime.com/xmlprime/doc/2.0/xslt-command-line-reference.htm), I am still not able to tell the xslt.exe "do the validation against the schema":
The Invoice xsd namespaces and version look like that:
Using the option --xsd and the later -v (for validate) I thought the xslt.exe can be used for validating against the schema. It clearly says that it needs <xsl:stylesheet> or <xsl:transform> -- I know I do not want the transformation. I need the validation.
How can the XmlPrime's xslt.exe be used for validation against the XML Schema?
Update: I should better explain my goals. For that, here is more realistic content of my testing directory. The common/ contain the .xsd files for validation and one .xslt file that produces the HTML version of an XML invoice document. All of that is officially available as is. Then the samples/ are the real samples produced from an ERP system somehow (using some tools I do not know). My goal is to do: the validation of the invoice XML structure (a must), validation against the XML schema (here the UBL-Invoice-2.1.xsd), and the validation against Schematron rules (the validity of used values; here the peppol_schematron/PEPPOL-EN16931-UBL.sch). So, everything I am trying to do is to follow that path:
I am still considering XmlPrime and also Saxon. The task is solved for the third party, the license price matters, but need not to be free. It is still not clear what is a must and what will not be needed in near future. However, the decisions should be done and core of the solution should be ready, say, within 3 weeks.


