At most one country subdivision in the ship-from party’s postal address

Error FX-SCH-A-000804 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 ship-from party’s ram:PostalTradeAddress contains more than one ram:CountrySubDivisionName. This element may occur no more than once in the postal address.

What the rule means

ram:CountrySubDivisionName identifies a country subdivision in the postal address. Multiple entries of this kind are not permitted in this XML context.

Please provide no more than one country subdivision in the ship-from party’s postal address

ram:CountrySubDivisionName is entered more than once in the ship-from party’s postal address. You can adjust the XML so that this element occurs no more than once.

What to do
  1. Find ram:CountrySubDivisionName in the ram:PostalTradeAddress of ram:ShipFromTradeParty.
  2. Remove duplicate elements so that no more than one remains.
  3. Regenerate the invoice 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 check counts the direct ram:CountrySubDivisionName elements in ram:PostalTradeAddress and requires a count of no more than one.

Where the rule applies

The rule applies to ram:CountrySubDivisionName within the ram:PostalTradeAddress of ram:ShipFromTradeParty.

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