Specify exactly one guideline identifier

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

Within ram:GuidelineSpecifiedDocumentContextParameter, ram:ID does not occur exactly once. The element is missing or appears more than once.

What the rule means

The guideline identifier specifies the profile used to create the document. Exactly one ram:ID element is required in the guideline context.

Please include exactly one guideline identifier

ram:ID is missing from the guideline context, or the element appears there more than once. Exactly one entry identifies the profile unambiguously.

What to do
  1. Find ram:ID in ram:GuidelineSpecifiedDocumentContextParameter.
  2. Add the element if it is missing, or remove duplicates so that it occurs exactly once.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:GuidelineSpecifiedDocumentContextParameter/>
✓ Correct
<ram:GuidelineSpecifiedDocumentContextParameter>
  <ram:ID/>
</ram:GuidelineSpecifiedDocumentContextParameter>
Technical details

The XPath test counts the direct child elements ram:ID and requires the count to be 1.

Where the rule applies

The rule applies within ram:GuidelineSpecifiedDocumentContextParameter in the document context.

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