Allow only one ram:Name element

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

ram:Name occurs more than once under rsm:ExchangedDocument. At most one such element is allowed in this context.

What the rule means

The limit keeps the document data unambiguous by preventing repeated ram:Name elements at this location.

Please use only one `ram:Name` under `rsm:ExchangedDocument`

The invoice document data contain ram:Name more than once. Remove the duplicate so that the element occurs only once there.

What to do
  1. Find the repeated ram:Name elements under rsm:ExchangedDocument.
  2. Leave no more than one ram:Name element there.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<rsm:ExchangedDocument>
  <ram:Name>First</ram:Name>
  <ram:Name>Second</ram:Name>
</rsm:ExchangedDocument>
✓ Correct
<rsm:ExchangedDocument>
  <ram:Name>Name</ram:Name>
</rsm:ExchangedDocument>
Technical details

The test counts the direct child elements ram:Name of rsm:ExchangedDocument and allows no more than one.

Where the rule applies

The rule applies directly under rsm:ExchangedDocument in the invoice document data.

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