Provide the address subdivision no more than once

Error FX-SCH-A-000768 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:PostalTradeAddress contains ram:CountrySubDivisionName more than once.

What the rule means

The rule limits the subdivision information in this address to one element. The element is optional, but it must not occur more than once.

Please provide the address subdivision no more than once

The seller tax representative’s address contains multiple ram:CountrySubDivisionName entries. This element may occur no more than once.

What to do
  1. Find the seller tax representative’s ram:PostalTradeAddress.
  2. Leave no more than one ram:CountrySubDivisionName in it.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName/>
  <ram:CountrySubDivisionName/>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName/>
</ram:PostalTradeAddress>
Technical details

The test counts the direct ram:CountrySubDivisionName elements in ram:PostalTradeAddress and allows zero or one.

Where the rule applies

The rule applies to ram:CountrySubDivisionName within the seller tax representative’s ram:PostalTradeAddress.

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