At most one ram:Name element

Error FX-SCH-A-001017 Factur-X

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

What the rule means

The referenced document can contain at most one name at this location. Multiple ram:Name elements do not conform to the intended XML structure.

Please include the referenced document name no more than once

The referenced document name appears more than once in ram:AdditionalReferencedDocument. You can adjust the XML structure so that there is at most one ram:Name element.

What to do
  1. Check the repeated ram:Name elements in ram:AdditionalReferencedDocument.
  2. Ensure that this element occurs no more than once there.
  3. Regenerate the invoice and check it again.
What it looks like
✗ Triggers the message
<ram:AdditionalReferencedDocument>
  <ram:Name>Name A</ram:Name>
  <ram:Name>Name B</ram:Name>
</ram:AdditionalReferencedDocument>
✓ Correct
<ram:AdditionalReferencedDocument>
  <ram:Name>Name</ram:Name>
</ram:AdditionalReferencedDocument>
Technical details

The Schematron check counts the direct ram:Name elements within ram:AdditionalReferencedDocument and permits no more than one.

Where the rule applies

The rule applies to ram:AdditionalReferencedDocument in the agreement for an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeAgreement/ram:AdditionalReferencedDocument
Test expression (assert/@test)
count(ram:Name)<=1