filename must be present

Error FX-SCH-A-001021 Factur-X

Attribute '@filename' 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 filename attribute is missing from ram:AttachmentBinaryObject. As a result, the filename of the binary attachment is not specified.

What the rule means

The filename attribute identifies the filename of the binary attachment.

Please add the filename to AttachmentBinaryObject

The filename is missing for the binary attachment. Add the filename attribute to the relevant XML element.

What to do
  1. Locate the affected ram:AttachmentBinaryObject.
  2. Add the filename attribute with the filename.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:AttachmentBinaryObject/>
✓ Correct
<ram:AttachmentBinaryObject filename="document.pdf"/>
Technical details

The Schematron condition checks whether the filename attribute is present on ram:AttachmentBinaryObject.

Where the rule applies

The rule applies to 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)
@filename