Technology

XSD Schema (XML Schema Definition)

Definition

An XSD schema (XML Schema Definition) defines the formal structure, element names, and data types of an XML document. In the context of XRechnung and EN 16931, XSD schema validation is used as the first validation step to verify that an XML document complies with the basic syntactic structure. Content-level checking of business rules is then performed by Schematron.

Related terms

SchematronSchematron is a rule-based validation language for XML documents, based on XPath expressions. In the context of XRechnung and EN 16931, Schematron rules are used to perform content-level plausibility checks that go beyond pure schema validation (XSD). The official Schematron rules for XRechnung are maintained by KoSIT and are part of the open-source Validator.UBL (Universal Business Language)UBL (Universal Business Language) is an OASIS-standardised XML vocabulary for business documents, including invoices, orders, and delivery notes. UBL 2.1 is one of the two permitted syntaxes for EN 16931-compliant invoices and is used for XRechnung as well as Peppol BIS Billing 3.0, among others. UBL invoices use the namespace `urn:oasis:names:specification:ubl:schema:xsd:Invoice-2`.CII (UN/CEFACT Cross Industry Invoice)CII stands for Cross Industry Invoice and is the UN/CEFACT XML document format for invoices. It is one of the two syntaxes permitted by EN 16931 alongside UBL and forms the basis of ZUGFeRD and Factur-X. CII documents use the namespace `urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100`.XRechnungXRechnung is the German standard for structured electronic invoices in public sector procurement (B2G). It is based on the European standard EN 16931 and is available in two syntaxes: UBL 2.1 and UN/CEFACT CII. Since 27 November 2020, federal public buyers have been required to accept electronic invoices in XRechnung format, and state and municipal authorities have been progressively included.XRechnung Validator (KoSIT)The XRechnung Validator is a command-line tool developed by KoSIT and released as open source for checking XRechnung documents for conformity. It validates both XML schema validity (XSD) and content-level business rules via Schematron. The tool is regularly updated when new XRechnung versions are released and serves as the reference implementation for validation.