Element 'ram:RoleCode' may occur at maximum 1 times.
ram:RoleCode occurs more than once in ram:InvoiceeTradeParty. This element may appear there at most once.
The limit prevents multiple role code entries for the same invoicee within this element.
The invoicee has multiple ram:RoleCode elements. Keep no more than one.
- Find
ram:InvoiceeTradePartyin the invoice. - Remove additional
ram:RoleCodeelements so that no more than one remains. - Generate the invoice again and validate it once more.
<ram:InvoiceeTradeParty> <ram:RoleCode>A</ram:RoleCode> <ram:RoleCode>B</ram:RoleCode> </ram:InvoiceeTradeParty>
<ram:InvoiceeTradeParty> <ram:RoleCode>A</ram:RoleCode> </ram:InvoiceeTradeParty>
Technical details
The test counts the direct ram:RoleCode elements in ram:InvoiceeTradeParty and requires a count of no more than one.
The rule applies to ram:RoleCode within ram:InvoiceeTradeParty, the invoicee.
rule/@context)assert/@test)