Saftlint
XSD and semantics

XSD validation is necessary, but not sufficient.

XSD checks XML structure, element order and data types. It cannot by itself establish that references resolve, mappings are known, declared totals reconcile or transactions balance.

What XSD catches

When XSD validation fails

Saftlint reports up to 50 deduplicated XSD errors with line and column where available. Content checks that require an XSD-valid file are marked as not run, never as passed.

What requires semantic checks

An XSD-valid reference violation

An Owner can contain <AccountID>2250</AccountID> even when account 2250 is absent from GeneralLedgerAccounts. The structure and type are valid, but the reference is broken. Saftlint reports master.owner.account.exists.

If you develop a SAF-T exporter, this type of defect can become a permanent regression fixture. See how software vendors can test Norwegian SAF-T.