Element 'ram:SubjectCode' may occur at maximum 1 times.
An ram:IncludedNote contains more than one ram:SubjectCode. The element may occur at most once within a note.
The subject code assigns a category to a note. Multiple subject codes for the same note are not permitted by this rule.
A note contains more than one ram:SubjectCode. You can adjust the XML so that the note contains no more than one subject code.
- Locate the affected
ram:IncludedNote. - Check its
ram:SubjectCodeelements and remove any occurrences beyond the first. - Generate the invoice again and validate it once more.
<ram:IncludedNote> <ram:SubjectCode>...</ram:SubjectCode> <ram:SubjectCode>...</ram:SubjectCode> </ram:IncludedNote>
<ram:IncludedNote> <ram:SubjectCode>...</ram:SubjectCode> </ram:IncludedNote>
Technical details
The XPath test counts the ram:SubjectCode elements in the current ram:IncludedNote and passes when the count is at most one.
The rule applies to ram:IncludedNote notes in the document header.
rule/@context)assert/@test)