Provide the guideline identifier exactly once

Error FX-SCH-A-000407 Factur-X

Element 'ram:ID' 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:ID does not occur exactly once in GuidelineSpecifiedDocumentContextParameter. It is either missing or appears more than once.

What the rule means

ram:ID contains the identifier of the specified guideline. Exactly one element is required to identify the guideline unambiguously.

Please provide the guideline identifier exactly once

ram:ID is missing or appears more than once in the guideline context parameter. You can resolve this by providing it once.

What to do
  1. Check GuidelineSpecifiedDocumentContextParameter for ram:ID.
  2. Make sure it contains exactly one ram:ID element.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:GuidelineSpecifiedDocumentContextParameter/>
✓ Correct
<ram:GuidelineSpecifiedDocumentContextParameter>
  <ram:ID>...</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
Technical details

Within GuidelineSpecifiedDocumentContextParameter, the rule checks only whether the number of direct ram:ID elements is exactly 1.

Where the rule applies

The rule applies to the GuidelineSpecifiedDocumentContextParameter in the invoice’s document context.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter
Test expression (assert/@test)
count(ram:ID)=1