At most one subdivision in the payer’s address

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

In ram:PostalTradeAddress, ram:CountrySubDivisionName occurs more than once. The element may occur at most once.

What the rule means

The address may contain at most one name for a subdivision of the country.

Please include at most one subdivision in the payer’s address

The payer’s address contains ram:CountrySubDivisionName more than once. This element may appear at most once in the address.

What to do
  1. Find ram:PostalTradeAddress in the payer details for payment.
  2. Make sure ram:CountrySubDivisionName occurs no more than once in it.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>A</ram:CountrySubDivisionName>
  <ram:CountrySubDivisionName>B</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>A</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
Technical details

The Schematron condition counts the child elements ram:CountrySubDivisionName and allows no more than one occurrence.

Where the rule applies

The rule applies to ram:PostalTradeAddress in the payer details for payment.

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