Tuesday, February 18, 2025

How to validate a Peppol XML file

crux (“Command-line Refuter of Unshapely XML”) is a command-line tool “for XML schema and Schematron validation for any platform with a Java runtime”.

$ sudo apt install default-jre
$ java -v
openjdk version "11.0.26" 2025-01-21
OpenJDK Runtime Environment (build 11.0.26+4-post-Ubuntu-1ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.26+4-post-Ubuntu-1ubuntu122.04, mixed mode, sharing)

I downloaded SaxonHE12-5J.zip to ~/Downloads/saxon from https://github.com/Saxonica/Saxon-HE/tree/main/12/Java

$ sudo apt install maven

https://www.saxonica.com/html/documentation10/using-xsl/commandline/index.html

$ pytest /home/luc/work/book/docs/apps/cosi/ibanity.rst