Provide the ship-to country identifier exactly once

Error FX-SCH-A-000455 Factur-X

Element 'ram:CountryID' must occur exactly 1 times.

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

ram:CountryID is missing from ram:PostalTradeAddress or occurs more than once. Exactly one ram:CountryID is required.

What the rule means

ram:CountryID identifies the country of the postal address at the ship-to location.

Please provide the ship-to country exactly once

The country identifier is missing from the ship-to postal address or has been entered more than once. Make sure exactly one ram:CountryID is present.

What to do
  1. Locate ram:PostalTradeAddress for the party at the ship-to address.
  2. Make sure the postal address contains exactly one ram:CountryID.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
Technical details

The test counts child elements ram:CountryID in ram:PostalTradeAddress and requires exactly one occurrence.

Where the rule applies

The rule applies to the postal address of the party at the ship-to address, in ram:PostalTradeAddress.

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