ram:SpecifiedTaxRegistration may occur at most once

Error FX-SCH-A-000817 Factur-X

Element 'ram:SpecifiedTaxRegistration' may occur at maximum 1 times.

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

The ram:ShipToTradeParty element contains more than one ram:SpecifiedTaxRegistration element. At most one is permitted in this context.

What the rule means

The rule limits the number of tax registration elements for the delivery recipient to at most one.

Please use no more than one tax registration for the delivery recipient

Several ram:SpecifiedTaxRegistration elements are present in ram:ShipToTradeParty. Only one is allowed in this section.

What to do
  1. Locate ram:ShipToTradeParty in the delivery section.
  2. Remove extra ram:SpecifiedTaxRegistration elements so that no more than one remains.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ShipToTradeParty>
  <ram:SpecifiedTaxRegistration/>
  <ram:SpecifiedTaxRegistration/>
</ram:ShipToTradeParty>
✓ Correct
<ram:ShipToTradeParty>
  <ram:SpecifiedTaxRegistration/>
</ram:ShipToTradeParty>
Technical details

The check counts the direct child elements ram:SpecifiedTaxRegistration of ram:ShipToTradeParty and requires their number to be no greater than one.

Where the rule applies

The rule applies within the ram:ShipToTradeParty element in the delivery section.

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