Missing or repeated buyer agent name

Error FX-SCH-A-000650 Factur-X

Element 'ram:Name' 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:BuyerAgentTradeParty does not contain exactly one ram:Name. The element is either missing or occurs more than once.

What the rule means

The name identifies the buyer agent. Exactly one name is required to identify the agent clearly.

Please provide exactly one name for the buyer agent

The buyer agent’s name is missing or appears more than once. Exactly one ram:Name clearly identifies the agent.

What to do
  1. Find ram:BuyerAgentTradeParty.
  2. Make sure it contains exactly one ram:Name.
  3. Generate the invoice again and validate it again.
Technical details

The XPath test requires ram:Name to occur exactly once within ram:BuyerAgentTradeParty.

Where the rule applies

The rule applies within ram:BuyerAgentTradeParty in the seller-buyer agreement.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:BuyerAgentTradeParty
Test expression (assert/@test)
count(ram:Name)=1