ram:ID may occur at most once

Error FX-SCH-A-000451 Factur-X

Element 'ram:ID' 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

The ram:ShipToTradeParty element contains more than one ram:ID element. At most one ram:ID is permitted in this context.

What the rule means

The limit prevents multiple ram:ID elements from being supplied for the delivery recipient when this context allows at most one.

Please use no more than one recipient identifier `ram:ID`

Several ram:ID elements are present for the delivery recipient. Only one is allowed in this section.

What to do
  1. Locate ram:ShipToTradeParty in the delivery section.
  2. Remove extra ram:ID elements so that no more than one remains.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ShipToTradeParty>
  <ram:ID>1</ram:ID>
  <ram:ID>2</ram:ID>
</ram:ShipToTradeParty>
✓ Correct
<ram:ShipToTradeParty>
  <ram:ID>1</ram:ID>
</ram:ShipToTradeParty>
Technical details

The check counts the direct child elements ram:ID of ram:ShipToTradeParty and requires their number to be no greater than one.

Where the rule applies

The rule applies within the ram:ShipToTradeParty element in the delivery section.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:ShipToTradeParty
Test expression (assert/@test)
count(ram:ID)<=1