At most one subdivision in the seller's postal address

Error FX-SCH-A-001049 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 more than one ram:CountrySubDivisionName.

What the rule means

ram:CountrySubDivisionName identifies a subdivision in the postal address. Multiple entries exceed the maximum number permitted for this element.

Please include the subdivision in the seller's postal address no more than once

The subdivision is listed more than once in the seller's postal address. You can limit it to no more than one ram:CountrySubDivisionName.

What to do
  1. Locate the seller's ram:PostalTradeAddress for the item.
  2. Check the ram:CountrySubDivisionName elements it contains.
  3. Remove any extra entries so that no more than one remains.
  4. 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 the direct ram:CountrySubDivisionName elements within ram:PostalTradeAddress and permits zero or one.

Where the rule applies

The rule applies to the postal address of the seller of an item in an invoice line.

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