Use an allowed MIME type for the binary attachment

Error FX-SCH-A-001020 Factur-X

Value of '@mimeCode' is not allowed.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The value of @mimeCode is not included in the value list used by this rule. An empty value is also accepted by this check.

What the rule means

The MIME code identifies the binary attachment as a supported media type. This rule cannot confirm an unlisted value as an allowed MIME code.

Please use an allowed MIME type for the binary attachment

The value of @mimeCode on ram:AttachmentBinaryObject is not included in the value list used for it. Check the entered value against that list.

What to do
  1. Find the affected ram:AttachmentBinaryObject and read the value of @mimeCode.
  2. Compare the value with the MIME code value list.
  3. Generate the invoice again and validate it.
Technical details

The check accepts an empty value or a value listed in FACTUR-X_EXTENDED_codedb.xml under code list ID 19.

Where the rule applies

The rule applies to the value of @mimeCode on ram:AttachmentBinaryObject of an additional referenced document on an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject
Test expression (assert/@test)
string-length($codeValue19)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=19]/enumeration[@value=$codeValue19]