Back to Compliance Hub
Critical

SCHEMA-002

Wrong Root Element or Namespace (No Matching Scenario, No Rule ID)

What This Error Means

SCHEMA-002 is not an official rule ID; docutools.pro uses it as a label for well-formed files that the KoSIT validator cannot assign to a validation scenario. The validator selects the scenario from the root element, its namespace and the specification identifier BT-24. If nothing matches, the report says that no scenario matched, shows no rule ID, and the file is not accepted (current KoSIT versions: 'Das Dokument sollte nicht automatisiert angenommen werden'). For XRechnung in UBL the root must be Invoice in the namespace urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 (or CreditNote in ...:CreditNote-2); for CII it is rsm:CrossIndustryInvoice.

Why this happens

The KoSIT validator configuration for XRechnung 3.0.x (release 31 August 2026) contains scenarios for XRechnung (UBL Invoice, UBL CreditNote, CII), the XRechnung Extension (UBL Invoice, CII), XRechnung CVD for clean vehicles (UBL Invoice, UBL CreditNote, CII) and plain EN 16931 with the identifier urn:cen.eu:en16931:2017 (UBL Invoice, UBL CreditNote, CII; these run only the EN 16931 rules, no XRechnung rules). Each scenario matches on the root element in its namespace together with the exact value of BT-24. Common reasons for no match: a misspelled or versioned namespace (for example Invoice-2.1); the root element has no namespace at all; the cac and cbc prefixes point to wrong URIs; a credit note is wrapped in Invoice instead of CreditNote; BT-24 is missing, has a trailing space or still carries an XRechnung 2.x identifier; a ZUGFeRD file with a profile identifier such as BASIC or EXTENDED is checked against the XRechnung configuration; or a PDF was uploaded instead of the embedded XML. Because no Schematron runs, the report contains none of the familiar BR codes, which often makes this error look mysterious.

How to Fix It

Use the correct root element and namespace for your syntax and document type, and set BT-24 to the exact XRechnung 3.0 identifier. Do not mix UBL and CII in one document.

Step-by-step

1) Confirm which syntax the recipient expects: UBL or CII (both are allowed for XRechnung). 2) UBL invoice: root Invoice with default namespace urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 and the standard cac/cbc namespaces. 3) UBL credit note: root CreditNote with urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2. 4) CII: rsm:CrossIndustryInvoice with the UN/CEFACT namespaces for rsm, ram and udt. 5) Set BT-24 exactly to urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 (see BR-1 and BR-DE-21). 6) For a ZUGFeRD PDF, extract the embedded XML; an XRechnung validator checks XML, not PDF. 7) Validate again; once a scenario matches, the report lists the schema and Schematron steps.

XML Example
<!-- UBL invoice -->
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
         xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
         xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
  <!-- ... -->
</Invoice>

<!-- CII invoice -->
<rsm:CrossIndustryInvoice
    xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
    xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
    xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
  <!-- ... -->
</rsm:CrossIndustryInvoice>

Fix Automatically

Upload your invoice to our Smart Repair engine. It checks the file against the full KoSIT rule set, including SCHEMA-002, and corrects supported fields with a GoBD audit trail.

Open Smart Repair

Frequently asked questions

Which namespace does XRechnung use?

For UBL invoices urn:oasis:names:specification:ubl:schema:xsd:Invoice-2, for UBL credit notes the CreditNote-2 namespace. For CII the root is rsm:CrossIndustryInvoice in urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100.

Can I mix UBL and CII?

No. A document is either UBL or CII from start to finish. Choose one syntax and use it consistently.

My namespace is right. Why is there still no scenario?

Check BT-24. The scenario also requires the exact XRechnung 3.0 identifier; an old 2.x identifier or a ZUGFeRD BASIC or EXTENDED profile ID leads to the same result. The plain EN 16931 identifier urn:cen.eu:en16931:2017 matches an EN 16931 scenario instead, which runs no XRechnung rules.

Related Errors

Other commonly encountered validation errors