Provide the ship-to subdivision no more than once

Error FX-SCH-A-000456 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. The element may occur there at most once.

What the rule means

ram:CountrySubDivisionName contains the subdivision of the ship-to address. The rule limits this element to one occurrence in the postal address.

Please list the ship-to subdivision no more than once

The subdivision is entered more than once in the ship-to postal address. This element may occur there at most once.

What to do
  1. Locate ram:CountrySubDivisionName in ram:PostalTradeAddress for the party at the ship-to address.
  2. Remove duplicate occurrences so that the element appears no more than once.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>Region A</ram:CountrySubDivisionName>
  <ram:CountrySubDivisionName>Region B</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>Region A</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
Technical details

The test counts child elements ram:CountrySubDivisionName in ram:PostalTradeAddress and accepts zero or one occurrence.

Where the rule applies

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

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