Element 'ram:TypeCode' must occur exactly 1 times.
In ram:ExchangedDocument, ram:TypeCode is either missing or occurs more than once. The element must occur exactly once.
ram:TypeCode specifies the type of invoice document. The document type must be stated unambiguously by exactly one element in the header.
ram:TypeCode is missing from the document header or appears more than once. Having exactly one such element resolves this issue.
- Locate
ram:ExchangedDocumentin the XML. - Check whether
ram:TypeCodeis missing or occurs more than once. - Ensure that
ram:TypeCodeoccurs exactly once. - Generate the invoice again and validate it once more.
<ram:ExchangedDocument/>
<ram:ExchangedDocument> <ram:TypeCode>380</ram:TypeCode> </ram:ExchangedDocument>
Technical details
The rule uses count(ram:TypeCode)=1 to check that ram:TypeCode occurs exactly once in the context.
The rule applies in the invoice header element ram:ExchangedDocument.
rule/@context)assert/@test)