Allowed mimeCode value

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

If mimeCode has a value, it must be listed in the value list used by this rule. A value not listed there is not allowed; an empty value also satisfies this check.

What the rule means

The value list ensures that media types are expressed consistently using defined values in this XML context.

Please use an allowed value for mimeCode

The specified media type is not included in the value list used by this rule. Use a value listed there or leave the value empty.

What to do
  1. Check the mimeCode value on the affected ram:AttachmentBinaryObject.
  2. Replace a value not listed in the value list used by this rule with a listed value, or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty mimeCode value or a value present in enumeration 19 of the referenced code list.

Where the rule applies

The rule checks the mimeCode value on ram:AttachmentBinaryObject of a referenced document on the agreement level of 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]