xmloom

XSLT 3.0 · XPath 3.1 · ISO Schematron · pure Rust

Validate EU e-invoices without Java.

xmloom runs the official EN 16931, Peppol BIS and XRechnung validation rules natively — in your terminal, in Python, in Node, or right here in the browser. It produced validation reports identical to Saxon’s on all 3,818 runs we judged (seven rule sets, 2,653 test invoices). Your file never leaves this page.

01 Validate an invoice

UBL 2.1 Invoice / CreditNote or UN/CEFACT CII. Syntax is detected automatically.

Drop an XML invoice or

or try a sample:

Rule sets

Results appear here: every business rule that fails, with its BR code, the message from the rule authors, and where in the document it fired.

02 XSLT & XPath playground

The same engine. Templates, grouping, maps, arrays, higher-order functions, xsl:evaluate, JSON.


  

03 Measured, not claimed

Every number below comes from an external judge: the W3C test suites and Saxon-HE 13.1 as the reference implementation.

3,818 / 3,818
e-invoice validation reports identical to Saxon-HE (EN 16931 official XSLT; Peppol BIS 3, CEN and XRechnung Schematron)
98.7%
of the 21,855 applicable W3C QT3 tests for XPath 3.1
87.7%
of the 8,165 applicable W3C XSLT 3.0 tests, packages included (streaming and schema-aware tests excluded)
faster
than Saxon-HE on all five XSLT throughput tests and on all seven e-invoice rule sets

Full tables, methodology and known gaps are in the README.

04 Use it anywhere

Command line

xmloom validate --rules EN16931-UBL-validation.xslt invoice.xml
xmloom -s:in.xml -xsl:style.xsl -o:out.html
xmloom schematron -sch:rules.sch -s:doc.xml

Python

import xmloom
rules = xmloom.Validator.schematron("PEPPOL-EN16931-UBL.sch")
report = rules.validate(open("invoice.xml").read())
print(report.valid, [f.id for f in report.errors])

JavaScript (WASM)

import init, { compileSchematron, validate } from "xmloom";
await init();
const h = compileSchematron(schText);
const r = JSON.parse(validate(h, invoiceXml, false));

Rust

let ss = xmloom::schematron::compile_schematron_file(
    path, &Default::default())?.stylesheet;
let report = xmloom::schematron::validate_with(&ss, &doc)?;