Element 'ram:TypeCode' must occur exactly 1 times.
The additional referenced document does not contain exactly one ram:TypeCode. The element occurs more than once. Because the rule applies to documents with ram:TypeCode 50, in this context it particularly detects duplicate occurrences.
ram:TypeCode identifies the kind of referenced document. Exactly one occurrence prevents multiple document types from being specified for the same referenced document.
The additional referenced document contains ram:TypeCode more than once. Exactly one such element is required for this document.
- Locate the additional referenced document with
ram:TypeCode50. - Check whether
ram:TypeCodeoccurs more than once in it. - Remove the extra
ram:TypeCodeelements so that exactly one remains. - Regenerate the invoice and validate it again.
<ram:AdditionalReferencedDocument> <ram:TypeCode>50</ram:TypeCode> <ram:TypeCode>50</ram:TypeCode> </ram:AdditionalReferencedDocument>
<ram:AdditionalReferencedDocument> <ram:TypeCode>50</ram:TypeCode> </ram:AdditionalReferencedDocument>
Technical details
The assertion counts the direct ram:TypeCode elements in the current ram:AdditionalReferencedDocument and requires exactly one. The context filter selects documents with ram:TypeCode 50.
The rule applies to an additional referenced document with ram:TypeCode 50 within the document-level agreement.
rule/@context)assert/@test)