Exactly one buyer name

Error FX-SCH-A-000030 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:Name does not occur exactly once in ram:BuyerTradeParty. The element is either missing or occurs more than once.

What the rule means

The buyer information must contain exactly one name element so that the buyer is identified unambiguously on the invoice.

Please provide exactly one name for the buyer

The buyer information is missing ram:Name or contains it more than once. A single name element corrects this issue.

What to do
  1. Check ram:BuyerTradeParty for ram:Name.
  2. Make sure exactly one ram:Name element is present.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:BuyerTradeParty/>
✓ Correct
<ram:BuyerTradeParty>
  <ram:Name>Example Buyer</ram:Name>
</ram:BuyerTradeParty>
Technical details

The XPath test count(ram:Name)=1 checks that exactly one direct ram:Name child element is present.

Where the rule applies

The rule applies to ram:Name within the buyer information ram:BuyerTradeParty.

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