Exactly one ID element in SpecifiedTaxRegistration

Error FX-SCH-A-000881 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

ID is missing from SpecifiedTaxRegistration or occurs more than once. It must be present exactly once.

What the rule means

The rule requires exactly one identifier element for the invoicee’s tax registration.

Please provide exactly one identifier for the invoicee’s tax registration

ID is missing or appears more than once in SpecifiedTaxRegistration. The tax registration must contain exactly one ID element.

What to do
  1. Find the invoicee’s SpecifiedTaxRegistration.
  2. Check how many times ID occurs in it.
  3. Add exactly one ID element or remove any duplicates.
  4. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTaxRegistration/>
✓ Correct
<ram:SpecifiedTaxRegistration>
  <ram:ID>12345</ram:ID>
</ram:SpecifiedTaxRegistration>
Technical details

Within SpecifiedTaxRegistration, the number of direct ID elements is checked; the test passes only when there is exactly one.

Where the rule applies

The rule applies to the invoicee’s tax registration in SpecifiedTaxRegistration.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:InvoiceeTradeParty/ram:SpecifiedTaxRegistration
Test expression (assert/@test)
count(ram:ID)=1