At most one country subdivision in the postal address

Error FX-SCH-A-000995 Factur-X

Element 'ram:CountrySubDivisionName' 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:CountrySubDivisionName occurs more than once in ram:PostalTradeAddress. This element may occur at most once.

What the rule means

ram:CountrySubDivisionName contains the name of a subdivision in the postal address. The rule limits this element to at most one occurrence.

Please use no more than one subdivision in the payee’s postal address

ram:CountrySubDivisionName appears more than once in the payee’s postal address. This element may be entered no more than once.

What to do
  1. Locate the payee’s ram:PostalTradeAddress.
  2. Make sure it contains no more than one ram:CountrySubDivisionName.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>North</ram:CountrySubDivisionName>
  <ram:CountrySubDivisionName>East</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>North</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
Technical details

The XPath test checks whether the number of direct ram:CountrySubDivisionName child elements is at most one; the element may also be absent.

Where the rule applies

The rule applies to ram:CountrySubDivisionName in the payee’s postal address.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradePaymentTerms/ram:PayeeTradeParty/ram:PostalTradeAddress
Test expression (assert/@test)
count(ram:CountrySubDivisionName)<=1