Provide exactly one note content

Error FX-SCH-A-000160 Factur-X

Element 'ram:Content' 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:Content does not occur exactly once in ram:IncludedNote. The element is either missing or occurs more than once.

What the rule means

ram:Content contains the text of the note. Exactly one occurrence ensures that the note has a single, clearly defined content element.

Please provide the note content exactly once

ram:Content is missing from ram:IncludedNote or occurs more than once. Having exactly one content element gives the note a clear structure.

What to do
  1. Check ram:IncludedNote.
  2. Ensure that it contains exactly one ram:Content.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:IncludedNote>
  <ram:Content>Note 1</ram:Content>
  <ram:Content>Note 2</ram:Content>
</ram:IncludedNote>
✓ Correct
<ram:IncludedNote>
  <ram:Content>Note</ram:Content>
</ram:IncludedNote>
Technical details

The test counts direct ram:Content elements in the context of ram:IncludedNote and requires exactly one.

Where the rule applies

Applies to ram:Content within the note ram:IncludedNote.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote
Test expression (assert/@test)
count(ram:Content)=1