Exactly one country identifier in the seller address

Error FX-SCH-A-000035 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 the seller’s ram:PostalTradeAddress or occurs more than once. It must occur exactly once.

What the rule means

ram:CountryID specifies the country of the seller’s address. The rule requires exactly one country entry in that address.

Please provide exactly one country identifier for the seller address

The seller’s postal address is missing a country identifier or contains it more than once. Make sure ram:PostalTradeAddress contains exactly one ram:CountryID.

What to do
  1. Find ram:PostalTradeAddress in the seller details.
  2. Check that the address contains exactly one ram:CountryID element.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID/>
</ram:PostalTradeAddress>
Technical details

The rule counts the direct ram:CountryID elements in ram:PostalTradeAddress and requires a count of 1.

Where the rule applies

The rule applies to ram:CountryID within the seller’s ram:PostalTradeAddress.

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