Provide the ship-from communication details no more than once

Error FX-SCH-A-000796 Factur-X

Element 'ram:URIUniversalCommunication' 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:URIUniversalCommunication occurs more than once in ram:ShipFromTradeParty.

What the rule means

The rule limits the number of communication details for the ship-from party to at most one. Under this rule, ram:URIUniversalCommunication may be absent.

Please provide the ship-from communication details no more than once

ram:URIUniversalCommunication appears more than once in ram:ShipFromTradeParty. Remove the extra occurrences so that the communication details appear no more than once.

What to do
  1. Locate ram:ShipFromTradeParty in the delivery information.
  2. Check whether ram:URIUniversalCommunication occurs more than once there and remove any extra occurrences.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:ShipFromTradeParty>
  <ram:URIUniversalCommunication/>
  <ram:URIUniversalCommunication/>
</ram:ShipFromTradeParty>
✓ Correct
<ram:ShipFromTradeParty>
  <ram:URIUniversalCommunication/>
</ram:ShipFromTradeParty>
Technical details

The Schematron condition checks whether the number of direct ram:URIUniversalCommunication elements in the context is at most one.

Where the rule applies

The rule applies to ram:URIUniversalCommunication in ram:ShipFromTradeParty within the delivery information.

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