At most one tax registration

Error FX-SCH-A-000797 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 appears more than once in ram:ShipFromTradeParty. The test allows this element at most once.

What the rule means

The rule limits the number of tax registration details for the consignor conveyed through this element.

Please use no more than one tax registration in `ram:ShipFromTradeParty`

ram:SpecifiedTaxRegistration has been provided more than once for the consignor. This element may appear no more than once in this section.

What to do
  1. Find ram:ShipFromTradeParty in the delivery details.
  2. Check the ram:SpecifiedTaxRegistration elements it contains and remove any extra occurrences.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ShipFromTradeParty>
  <ram:SpecifiedTaxRegistration/>
  <ram:SpecifiedTaxRegistration/>
</ram:ShipFromTradeParty>
✓ Correct
<ram:ShipFromTradeParty>
  <ram:SpecifiedTaxRegistration/>
</ram:ShipFromTradeParty>
Technical details

The XPath test counts the direct ram:SpecifiedTaxRegistration elements within ram:ShipFromTradeParty and requires the count to be no greater than one.

Where the rule applies

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

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