Element 'ram:TypeCode' must occur exactly 1 times.
ram:TypeCode does not occur exactly once in rsm:ExchangedDocument. The element is either missing or present more than once.
ram:TypeCode identifies the type of document and must occur exactly once in the document header.
ram:TypeCode is missing from the document header or occurs more than once. Adjust the number of occurrences so the element appears exactly once.
- Make sure
rsm:ExchangedDocumentcontains exactly one directram:TypeCodeelement. - Generate the invoice again and validate it once more.
<rsm:ExchangedDocument> <ram:TypeCode>380</ram:TypeCode> <ram:TypeCode>381</ram:TypeCode> </rsm:ExchangedDocument>
<rsm:ExchangedDocument> <ram:TypeCode>380</ram:TypeCode> </rsm:ExchangedDocument>
Technical details
The XPath test counts the direct ram:TypeCode elements in rsm:ExchangedDocument and requires the count to be 1.
The rule applies within the document header, rsm:ExchangedDocument.
rule/@context)assert/@test)