Provide the attachment's MIME type

Error FX-SCH-A-000285 Factur-X

Attribute '@mimeCode' is required in this context.

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

The @mimeCode attribute is missing from ram:AttachmentBinaryObject.

What the rule means

The @mimeCode attribute specifies the MIME type of the binary attachment. Without this attribute, that information is absent from the XML structure.

Please provide the MIME type for the file attachment

The file attachment for the referenced document with the value 916 is missing its MIME type. Add the @mimeCode attribute to ram:AttachmentBinaryObject.

What to do
  1. Find the ram:AttachmentBinaryObject in the referenced document with the ram:TypeCode value 916.
  2. Add the @mimeCode attribute there.
  3. Generate the invoice again and validate it again.
Technical details

The rule checks whether the @mimeCode attribute is present on ram:AttachmentBinaryObject.

Where the rule applies

On the ram:AttachmentBinaryObject of the ram:AdditionalReferencedDocument whose ram:TypeCode has the value 916.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:AdditionalReferencedDocument[ram:TypeCode="916"]/ram:AttachmentBinaryObject
Test expression (assert/@test)
@mimeCode