CountrySubDivisionName no more than once

Error FX-SCH-A-000687 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 this postal address.

What the rule means

The rule limits the name of a country subdivision in this postal address to no more than one element.

Please include the country subdivision name no more than once

ram:CountrySubDivisionName appears more than once in the postal address of the buyer’s tax representative’s legal organization. You can resolve this by limiting the entry to one element.

What to do
  1. Look for repeated ram:CountrySubDivisionName elements in the postal address of ram:SpecifiedLegalOrganization.
  2. Remove the extra elements so that no more than one remains.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>A</ram:CountrySubDivisionName>
  <ram:CountrySubDivisionName>B</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>A</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
Technical details

The XPath context is ram:PostalTradeAddress; the check verifies that it contains no more than one direct ram:CountrySubDivisionName element.

Where the rule applies

The rule applies to the postal address within the buyer’s tax representative’s ram:SpecifiedLegalOrganization, specifically to ram:CountrySubDivisionName.

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