Provide no more than one ram:SpecifiedTaxRegistration

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

ram:SpecifiedTaxRegistration occurs more than once in ram:UltimateShipToTradeParty. This element may occur no more than once there.

What the rule means

The rule limits the number of ram:SpecifiedTaxRegistration elements in ram:UltimateShipToTradeParty to zero or one.

Please use no more than one `ram:SpecifiedTaxRegistration` for the ultimate ship-to party

Multiple ram:SpecifiedTaxRegistration elements are present in ram:UltimateShipToTradeParty. This element may occur no more than once in this XML section.

What to do
  1. Check ram:UltimateShipToTradeParty and remove any extra ram:SpecifiedTaxRegistration elements.
  2. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:UltimateShipToTradeParty>
  <ram:SpecifiedTaxRegistration/>
  <ram:SpecifiedTaxRegistration/>
</ram:UltimateShipToTradeParty>
✓ Correct
<ram:UltimateShipToTradeParty>
  <ram:SpecifiedTaxRegistration/>
</ram:UltimateShipToTradeParty>
Technical details

The rule checks that the number of direct ram:SpecifiedTaxRegistration elements in ram:UltimateShipToTradeParty is no greater than one.

Where the rule applies

The rule applies to ram:UltimateShipToTradeParty of an invoice line.

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