Element 'ram:ID' must occur exactly 1 times.
ram:ID does not occur exactly once in rsm:ExchangedDocument. The element is either missing or present more than once.
ram:ID contains the document identifier and must occur exactly once in the document header.
ram:ID 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:IDelement. - Generate the invoice again and validate it once more.
<rsm:ExchangedDocument> <ram:ID>INV-1</ram:ID> <ram:ID>INV-2</ram:ID> </rsm:ExchangedDocument>
<rsm:ExchangedDocument> <ram:ID>INV-1</ram:ID> </rsm:ExchangedDocument>
Technical details
The XPath test counts the direct ram:ID elements in rsm:ExchangedDocument and requires the count to be 1.
The rule applies within the document header, rsm:ExchangedDocument.
rule/@context)assert/@test)