What it means
XSD validates XML structure, element order, data types and cardinality.
Schematron evaluates contextual business rules that cannot be expressed cleanly in a structural schema.
A file can pass XSD and still fail semantic rules, code lists or national constraints.
Implementation method
- 1Parse XML securely and apply the exact XSD release.
- 2Run base semantic rules, then the national or network Schematron.
- 3Resolve external code lists using the release expected by the profile.
- 4Record rule IDs, locations, severities and artefact versions.
Common mistakes
Build an explicit control or test case for this condition.
Build an explicit control or test case for this condition.
Build an explicit control or test case for this condition.
Build an explicit control or test case for this condition.
Questions and answers
Which validation should run first?
Well-formed XML and XSD normally run before semantic Schematron and country-specific rules.
Why does an XSD-valid invoice get rejected?
Business rules, code lists, recipient routing, signatures or authority checks can still fail.
Can EInvoiceLab officially certify XSD or Schematron validation?
No. EInvoiceLab can inspect, prepare and explain technical data, but official conformance, delivery or acceptance depends on the active authority, network, accredited provider and validation artefacts.
Should I keep the original structured file?
Yes. Preserve the original XML or JSON, its hash, every validation report and the final authority or network response. A readable PDF should not replace the source document.