Concept Definition

What is XML schema validation?

XML schema validation is the process of checking that an XML document conforms to the structure, data types, and constraints defined in an XSD (XML Schema Definition) or DTD. For e-invoicing, schema validation ensures that required elements are present, data types are correct, and the document structure matches the invoice standard specification.

What is the difference between XML schema and Schematron validation?

XML schema (XSD) and Schematron serve complementary validation roles in e-invoicing:

  • XSD: Validates structure, element names, data types, and cardinality. Structural validation.
  • Schematron: Validates business rules that span multiple elements. E.g., if PaymentMeansCode is 30, then PayeeFinancialAccount must be present.
  • Both: Applied in sequence. Schema first, Schematron second. Both must pass for a valid invoice.

Frequently Asked Questions

Does XSD validation guarantee a compliant invoice?
No. XSD validation only checks structural conformance. A document can pass XSD validation but fail Schematron business rule validation. Complete invoice validation requires both XSD and Schematron checks.
Which schemas are used for Peppol BIS Billing 3.0 validation?
Peppol publishes official XSD schemas and Schematron rule sets for BIS Billing 3.0. Validators must apply the published UBL 2.1 XSD and the Peppol-specific Schematron rules. OpenPeppol maintains these in its GitHub repository.

Related Concepts

Related Regulations

Related Use Cases