Exactly one ram:ID for the dispatch location tax registration

Error FX-SCH-A-000810 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:SpecifiedTaxRegistration does not contain exactly one ram:ID element. The identifier is either missing or present more than once.

What the rule means

ram:ID contains the tax registration identifier for the dispatch location. Exactly one element ensures that this information is present unambiguously in this XML context.

Please provide exactly one tax identifier for the dispatch location

ram:ID is missing from the dispatch location tax registration or the element appears more than once. The structure can be made unambiguous.

What to do
  1. Open ram:SpecifiedTaxRegistration under ram:ShipFromTradeParty.
  2. Ensure that it contains exactly one ram:ID element.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTaxRegistration/>
✓ Correct
<ram:SpecifiedTaxRegistration>
  <ram:ID>IDENTIFIER</ram:ID>
</ram:SpecifiedTaxRegistration>
Technical details

The test requires the number of direct ram:ID child elements of ram:SpecifiedTaxRegistration to be exactly one.

Where the rule applies

The rule applies to ram:SpecifiedTaxRegistration under ram:ShipFromTradeParty.

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