Provide no more than one ram:CountrySubDivisionName

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

The postal address contains more than one ram:CountrySubDivisionName. This element may occur no more than once there.

What the rule means

The rule limits the subdivision information in this postal address to a single element.

Please provide no more than one subdivision in the delivery recipient’s address

The delivery recipient’s postal address contains ram:CountrySubDivisionName more than once. Limiting it to one such element will resolve the issue.

What to do
  1. Find all ram:CountrySubDivisionName elements in ram:PostalTradeAddress.
  2. Keep no more than one ram:CountrySubDivisionName there.
  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

Within ram:PostalTradeAddress, the count of direct ram:CountrySubDivisionName elements is checked; zero or one is allowed.

Where the rule applies

The rule applies to the postal address of the organization at the delivery recipient, under ram:ShipToTradeParty.

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