Provide at most one name for each additional referenced document

Error FX-SCH-A-001017 Factur-X

Element 'ram:Name' may occur at maximum 1 times.

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

A ram:AdditionalReferencedDocument contains more than one ram:Name. This element may occur at most once there.

What the rule means

The name identifies the additional referenced document associated with an invoice line. Multiple names at this location do not conform to the intended XML structure.

Please provide no more than one name for the additional referenced document

More than one name is entered for an additional referenced document on an invoice line. You can resolve this by using only one ram:Name there.

What to do
  1. Find the affected ram:AdditionalReferencedDocument on the invoice line.
  2. Leave no more than one ram:Name in it.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:AdditionalReferencedDocument>
  <ram:Name>Nom 1</ram:Name>
  <ram:Name>Nom 2</ram:Name>
</ram:AdditionalReferencedDocument>
✓ Correct
<ram:AdditionalReferencedDocument>
  <ram:Name>Nom</ram:Name>
</ram:AdditionalReferencedDocument>
Technical details

The check counts child ram:Name elements and passes when their number is at most one.

Where the rule applies

The rule applies to ram:AdditionalReferencedDocument of an invoice line in the trade line agreement section.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeAgreement/ram:AdditionalReferencedDocument
Test expression (assert/@test)
count(ram:Name)<=1