Skip to content

BR-DEX-01: Invalid MIME code of an attachment (BT-125) in the XRechnung extension

Official message

[BR-DEX-01] Das Element … "Attached Document" (BT-125) benutzt einen nicht zulässigen MIME-Code: …. Im Falle einer Extension darf zusätzlich zu der Liste der mime codes (definiert in Abschnitt 8.2, "Binary Object") der MIME-Code application/xml genutzt werden.

XRechnung (CII) · Error · Message language: German · Version: xrechnung-3.0.2-validator-configuration-2026-08-31

[BR-DEX-01] Das Element … "Attached Document" (BT-125) benutzt einen nicht zulässigen MIME-Code: …. Im Falle einer Extension darf zusätzlich zu der Liste der mime codes (definiert in Abschnitt 8.2, "Binary Object") der MIME-Code application/xml genutzt werden.

XRechnung (UBL) · Error · Message language: German · Version: xrechnung-3.0.2-validator-configuration-2026-08-31
Severity
Error The invoice is invalid and may be rejected by the recipient.
Applies to
XRechnung (CII), XRechnung (UBL)
Affected fields
BT-125

What does this mean?

In an XRechnung extension invoice (identifier in BT-24), embedded attachments (Attached document, BT-125) may only use the MIME codes application/pdf, image/png, image/jpeg, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.oasis.opendocument.spreadsheet or additionally application/xml. An attachment uses a different code.

Typical causes

The attachment has a file format that is not allowed, e.g. a Word document, a ZIP file or a GIF image.
The MIME code is misspelled or does not match the content, e.g. image/jpg instead of image/jpeg or text/xml instead of application/xml.
The MIME code is missing.

How to fix the error

Convert the attachment into an allowed format (e.g. PDF) and state the matching MIME code.
CII: ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@mimeCode, UBL: cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@mimeCode.
Generate and validate the invoice again.

In E-Rechnungsfreund

In the invoice form ("Experte" view), section "Zusätzliche Dokumente (BG-24)" (additional documents), select the code matching the file format in the field "MIME-Code (BT-125-1)" of the affected document; convert files in other formats beforehand.

Example

Wrong

<ram:AttachmentBinaryObject mimeCode="application/msword" filename="timesheet.doc">...</ram:AttachmentBinaryObject>

Correct

<ram:AttachmentBinaryObject mimeCode="application/pdf" filename="timesheet.pdf">...</ram:AttachmentBinaryObject>
For developers: test expression per syntax

XRechnung (CII) (CII)

Context: ram:AttachmentBinaryObject[$isExtension]

.[@mimeCode = 'application/pdf' or @mimeCode = 'image/png' or @mimeCode = 'image/jpeg' or @mimeCode = 'text/csv' or @mimeCode = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' or @mimeCode = 'application/vnd.oasis.opendocument.spreadsheet' or @mimeCode = 'application/xml']

XRechnung (UBL) (UBL)

Context: cbc:EmbeddedDocumentBinaryObject[$isExtension]

.[@mimeCode = 'application/pdf' or @mimeCode = 'image/png' or @mimeCode = 'image/jpeg' or @mimeCode = 'text/csv' or @mimeCode = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' or @mimeCode = 'application/vnd.oasis.opendocument.spreadsheet' or @mimeCode = 'application/xml']

Related validation rules

  • BR-DEX-02: Line net amount does not match the sum of its sub invoice lines
  • BR-DEX-03: Sub invoice line without exactly one VAT information (BG-DEX-06)
  • BR-DEX-04: Scheme of a party identifier is not an ISO 6523 ICD code (extension)
  • BR-DEX-05: Scheme of a registration identifier is not an ISO 6523 ICD code (extension)
  • BR-DEX-06: Scheme of the item standard identifier (BT-157) is not an ISO 6523 ICD code (extension)
  • BR-DEX-07: Scheme of the electronic address is not an EAS code (extension)

Last updated:
Explanation of the validation rule, not legal or tax advice.