Exactly one country element in the organization address

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

In the relevant ram:PostalTradeAddress, ram:CountryID does not occur exactly once. The element is missing or appears more than once.

What the rule means

The postal address of the seller's legal organization must contain exactly one country identifier.

Please provide exactly one country element in the organization address

ram:CountryID is missing or appears more than once in the postal address of the seller's legal organization. The number of occurrences can be corrected at this location.

What to do
  1. Open ram:PostalTradeAddress within ram:SpecifiedLegalOrganization.
  2. Make sure it 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 the direct ram:CountryID child elements of ram:PostalTradeAddress and requires exactly one.

Where the rule applies

The rule applies to the postal address within the seller's ram:SpecifiedLegalOrganization.

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