Dev Tools · 1h ago
PHP Dev Reimplements EU E-Invoicing Rules to Avoid XSLT 2.0 Trap
A PHP developer building Croatian e-invoicing compliance found PHP's XSLTProcessor only supports XSLT 1.0, while the official Schematron validation file requires XSLT 2.0. To avoid a network dependency or compiled extension, he reimplemented 62 validation rules in PHP. The approach is portable but requires careful testing against the original Schematron to catch subtle bugs like the one he discovered in credit note validation.
Meridian48 take
The story highlights a practical gap in PHP's XML tooling that forces developers to reimplement government-mandated validation logic, increasing the risk of errors in a domain where mistakes mean rejected invoices.
Read the full reporting
Implementing EN 16931 national rules in PHP — and the trap that faked a bug on every credit note →
DEV Community
phpe-invoicing