Invalid attachment MIME code

Error FX-SCH-A-000644 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 on ram:AttachmentBinaryObject is not permitted in the designated code list. This check does not reject an empty value.

What the rule means

@mimeCode identifies the media type of the attached binary object. A code that is not permitted prevents this type from being identified in accordance with the code list.

Please use an allowed MIME code for the attachment

For the referenced document with ram:TypeCode 916, ram:AttachmentBinaryObject contains a value for @mimeCode that is not permitted. You can compare the code with the allowed values.

What to do
  1. Find the affected ram:AdditionalReferencedDocument with ram:TypeCode 916.
  2. Check the value of @mimeCode on ram:AttachmentBinaryObject against the allowed values in the code list.
  3. Generate the invoice again and validate it once more.
Technical details

The rule checks the value of @mimeCode against the entries in code list ID 19 in FACTUR-X_EXTENDED_codedb.xml; an empty value is accepted by this test.

Where the rule applies

Applies to @mimeCode on ram:AttachmentBinaryObject of an additional referenced document with ram:TypeCode 916 in the invoice header.

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