Skip to main content

BR-DE-22 Embedded document filenames must be unique across all attachments

Under the German XRechnung profile rule BR-DE-22, an invoice must not contain embedded document attachments with identical filenames (BT-125 / filename attribute). When multiple additional supporting documents (BG-24 / AdditionalDocumentReference) with binary attachments (cac:Attachment/cbc:EmbeddedDocumentBinaryObject or ram:AttachmentBinaryObject) are included, each attached file must have a distinct, unique filename. Duplicate filenames cause document management systems to overwrite or fail extraction of required invoice evidence such as timesheets, performance protocols, or contract annexes.

Problem Description

ERROR

German XRechnung rule (KoSIT, BR-DE) · XRechnung 3.0

Context and Significance

The German XRechnung validator strictly inspects all embedded attachment filenames for duplicate values, triggering Schematron error BR-DE-22 if two or more attachments share the same filename.

Solution

In your ERP or document management system, ensure that all attached files have distinct filenames before exporting the XRechnung XML. In UBL 2.1 syntax, populate distinct filename attributes on <cbc:EmbeddedDocumentBinaryObject filename="timesheet_2026_01.pdf" mimeCode="application/pdf"> inside each <cac:AdditionalDocumentReference>. In UN/CEFACT CII syntax, populate distinct filename attributes on <ram:AttachmentBinaryObject filename="timesheet_2026_01.pdf" mimeCode="application/pdf"> under <ram:AdditionalReferencedDocument>. Rename duplicate attachments (e.g. "annex_1.pdf", "annex_2.pdf") prior to submission.

Quick actions

Valid Examples

  • Invoice with two attachments: "stundennachweis_januar.pdf" and "leistungsabnahme_januar.pdf"
  • Invoice with single attachment: "vertrag_anlage_1.pdf"

Invalid Examples

  • Invoice includes two attachments both named "anlage.pdf"
  • cac:AdditionalDocumentReference contains multiple binary objects with identical filename attributes

Code Examples

Valid XML
<cac:AdditionalDocumentReference>
  <cbc:ID>DOC-1</cbc:ID>
  <cac:Attachment>
    <cbc:EmbeddedDocumentBinaryObject filename="stundennachweis.pdf" mimeCode="application/pdf">UEsDBBQ...</cbc:EmbeddedDocumentBinaryObject>
  </cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:AdditionalDocumentReference>
  <cbc:ID>DOC-2</cbc:ID>
  <cac:Attachment>
    <cbc:EmbeddedDocumentBinaryObject filename="leistungsnachweis.pdf" mimeCode="application/pdf">UEsDBBQ...</cbc:EmbeddedDocumentBinaryObject>
  </cac:Attachment>
</cac:AdditionalDocumentReference>
Invalid XML
<cac:AdditionalDocumentReference>
  <cbc:ID>DOC-1</cbc:ID>
  <cac:Attachment>
    <cbc:EmbeddedDocumentBinaryObject filename="anhang.pdf" mimeCode="application/pdf">UEsDBBQ...</cbc:EmbeddedDocumentBinaryObject>
  </cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:AdditionalDocumentReference>
  <cbc:ID>DOC-2</cbc:ID>
  <cac:Attachment>
    <cbc:EmbeddedDocumentBinaryObject filename="anhang.pdf" mimeCode="application/pdf">UEsDBBQ...</cbc:EmbeddedDocumentBinaryObject>
  </cac:Attachment>
</cac:AdditionalDocumentReference>

Affected Fields

Validation Tools