Specify exactly one guideline parameter

Error FX-SCH-A-000025 Factur-X

Element 'ram:GuidelineSpecifiedDocumentContextParameter' 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

The rsm:ExchangedDocumentContext does not contain exactly one ram:GuidelineSpecifiedDocumentContextParameter. The element is either missing or occurs more than once.

What the rule means

The guideline parameter identifies the specification used in the document context. This rule requires exactly one such element.

Please specify exactly one guideline parameter

ram:GuidelineSpecifiedDocumentContextParameter is missing from rsm:ExchangedDocumentContext or occurs more than once. You can adjust the context so that it occurs there exactly once.

What to do
  1. Locate the document’s rsm:ExchangedDocumentContext.
  2. Add a ram:GuidelineSpecifiedDocumentContextParameter if it is missing, or remove any occurrences beyond the first.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<rsm:ExchangedDocumentContext/>
✓ Correct
<rsm:ExchangedDocumentContext>
  <ram:GuidelineSpecifiedDocumentContextParameter/>
</rsm:ExchangedDocumentContext>
Technical details

The XPath test counts ram:GuidelineSpecifiedDocumentContextParameter elements in the current rsm:ExchangedDocumentContext and passes only when there is exactly one.

Where the rule applies

The rule applies within the document’s rsm:ExchangedDocumentContext.

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