Exactly one tax identifier with schemeID VA

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

ram:ID does not occur exactly once in the ram:SpecifiedTaxRegistration identified by schemeID="VA".

What the rule means

This tax registration must contain exactly one identifier for this scheme. If it is missing or appears more than once, the entry is not structurally unambiguous.

Please provide the tax identifier with schemeID VA exactly once

ram:ID is missing or appears more than once in the seller's tax registration with schemeID="VA". Exactly one ram:ID meets the required count.

What to do
  1. Locate the seller's ram:SpecifiedTaxRegistration whose ram:ID has the schemeID value VA.
  2. Make sure this registration contains exactly one ram:ID.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedTaxRegistration>
  <ram:ID schemeID="VA">123</ram:ID>
  <ram:ID schemeID="VA">456</ram:ID>
</ram:SpecifiedTaxRegistration>
✓ Correct
<ram:SpecifiedTaxRegistration>
  <ram:ID schemeID="VA">123</ram:ID>
</ram:SpecifiedTaxRegistration>
Technical details

The test counts direct ram:ID elements in ram:SpecifiedTaxRegistration whose schemeID attribute has the value VA and requires exactly one.

Where the rule applies

The rule applies to the tax registration of the seller of an item when ram:ID has the schemeID value VA.

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