Document name no more than once

Error FX-SCH-A-000630 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

In ram:ExchangedDocument, ram:Name occurs more than once. The element may occur no more than once.

What the rule means

ram:Name is an optional element of the invoice document. Multiple occurrences of this element are not allowed in this context.

Please include the document name no more than once

ram:Name appears multiple times in the document header. Remove the extra occurrences so that the element appears no more than once.

What to do
  1. Locate ram:ExchangedDocument in the XML.
  2. Check how many times ram:Name occurs inside it.
  3. Remove extra ram:Name elements so that no more than one remains.
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ExchangedDocument>
  <ram:Name>Facture</ram:Name>
  <ram:Name>Copie</ram:Name>
</ram:ExchangedDocument>
✓ Correct
<ram:ExchangedDocument>
  <ram:Name>Facture</ram:Name>
</ram:ExchangedDocument>
Technical details

The rule uses count(ram:Name)<=1 to ensure that zero or one ram:Name occurs in the context.

Where the rule applies

The rule applies in the invoice header element ram:ExchangedDocument.

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