Exactly one tax identifier with scheme FC

Error FX-SCH-A-001166 Factur-X

Element 'ram:ID' must occur exactly 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

This ram:SpecifiedTaxRegistration contains multiple ram:ID elements. The rule requires exactly one such element.

What the rule means

The rule limits this tax registration to exactly one identifier. Multiple identifier elements make the contents of this registration ambiguous.

Please provide exactly one tax identifier with scheme FC

The product manufacturer's tax registration with scheme FC contains more than one ram:ID element. You can correct the invoice by leaving exactly one such element there.

What to do
  1. Locate the manufacturer's ram:SpecifiedTaxRegistration whose ram:ID has schemeID="FC".
  2. Check how many ram:ID elements it contains.
  3. Ensure that it contains exactly one ram:ID element.
  4. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTaxRegistration>
  <ram:ID schemeID="FC">A</ram:ID>
  <ram:ID schemeID="FC">B</ram:ID>
</ram:SpecifiedTaxRegistration>
✓ Correct
<ram:SpecifiedTaxRegistration>
  <ram:ID schemeID="FC">A</ram:ID>
</ram:SpecifiedTaxRegistration>
Technical details

The test counts the direct ram:ID elements in ram:SpecifiedTaxRegistration and requires the count to be exactly one.

Where the rule applies

The rule applies to ram:SpecifiedTaxRegistration for the product manufacturer, where ram:ID has the attribute schemeID="FC".

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