Exactly one product end user tax registration ID

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

The product end user's tax registration does not contain exactly one ram:ID element. The ID is either missing or occurs more than once.

What the rule means

The ram:ID contains the tax registration identifier. Requiring exactly one such element ensures that this information is unambiguous.

Please provide exactly one tax registration ID for the product end user

The product end user's tax registration is missing ram:ID, or the element occurs more than once. The invoice can be completed by having exactly one such element.

What to do
  1. Locate ram:SpecifiedTaxRegistration for the product end user.
  2. Check the ram:ID elements it contains.
  3. Ensure that exactly one ram:ID element is present.
  4. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedTaxRegistration>
  <ram:ID>123</ram:ID>
  <ram:ID>456</ram:ID>
</ram:SpecifiedTaxRegistration>
✓ Correct
<ram:SpecifiedTaxRegistration>
  <ram:ID>123</ram:ID>
</ram:SpecifiedTaxRegistration>
Technical details

The rule counts the direct ram:ID elements in ram:SpecifiedTaxRegistration and requires the count to be 1.

Where the rule applies

The rule applies to ram:ID within the product end user's tax registration.

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