Provide the classification name no more than once

Error FX-SCH-A-000342 Factur-X

Element 'ram:ClassName' 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:ClassName occurs more than once in DesignatedProductClassification. The element may occur no more than once.

What the rule means

The rule limits the classification name to one element per DesignatedProductClassification. It prevents repeated name entries within the same classification.

Please provide the classification name no more than once

The classification name appears more than once for the product. You can remove the duplicates; the name is optional.

What to do
  1. Locate the affected DesignatedProductClassification.
  2. Remove duplicate ram:ClassName elements so that no more than one remains.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:DesignatedProductClassification>
  <ram:ClassName>Nom A</ram:ClassName>
  <ram:ClassName>Nom B</ram:ClassName>
</ram:DesignatedProductClassification>
✓ Correct
<ram:DesignatedProductClassification>
  <ram:ClassName>Nom</ram:ClassName>
</ram:DesignatedProductClassification>
Technical details

The test counts the direct ram:ClassName elements of DesignatedProductClassification and permits a count of 0 or 1.

Where the rule applies

The rule applies to DesignatedProductClassification within the product of an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedTradeProduct/ram:DesignatedProductClassification
Test expression (assert/@test)
count(ram:ClassName)<=1