At most one seller tax registration with FC

Error FX-SCH-A-000034 Factur-X

Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="FC"]' 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

More than one ram:SpecifiedTaxRegistration element in SellerTradeParty contains a ram:ID with schemeID="FC". This variant may occur at most once.

What the rule means

The rule allows at most one seller tax registration entry whose ID is marked FC. It does not specify other permitted values for other tax registrations.

Please provide the seller tax registration marked FC no more than once

The seller details contain multiple tax registrations whose ram:ID has a schemeID value of FC. This variant may appear only once.

What to do
  1. Find the ram:SpecifiedTaxRegistration elements in SellerTradeParty.
  2. Count the elements whose ram:ID has the schemeID="FC" attribute.
  3. Make sure this variant occurs no more than once.
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SellerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">ID-1</ram:ID>
  </ram:SpecifiedTaxRegistration>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">ID-2</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
✓ Correct
<ram:SellerTradeParty>
  <ram:SpecifiedTaxRegistration>
    <ram:ID schemeID="FC">ID-1</ram:ID>
  </ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
Technical details

Only ram:SpecifiedTaxRegistration elements with a child ram:ID whose schemeID attribute is exactly FC are counted; the count must not exceed 1.

Where the rule applies

The rule applies to tax registrations in SellerTradeParty with ram:ID and the schemeID="FC" attribute.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:SellerTradeParty
Test expression (assert/@test)
count(ram:SpecifiedTaxRegistration[ram:ID/@schemeID="FC"])<=1