Element 'ram:RoleCode' may occur at maximum 1 times.
ram:RoleCode occurs more than once within ram:InvoiceeTradeParty.
The structure allows at most one role code in ram:RoleCode within the invoicee. Multiple occurrences do not meet this requirement.
ram:RoleCode is entered more than once for the invoicee. Removing the duplicate entries makes it possible to validate the invoice again.
- Locate
ram:InvoiceeTradeParty. - Check its
ram:RoleCodeelements and retain no more than one. - Generate the invoice again and validate it again.
<ram:InvoiceeTradeParty> <ram:RoleCode>1</ram:RoleCode> <ram:RoleCode>2</ram:RoleCode> </ram:InvoiceeTradeParty>
<ram:InvoiceeTradeParty> <ram:RoleCode>1</ram:RoleCode> </ram:InvoiceeTradeParty>
Technical details
The test counts the direct ram:RoleCode elements of ram:InvoiceeTradeParty and requires the count to be no greater than one.
The rule applies to ram:RoleCode within ram:InvoiceeTradeParty.
rule/@context)assert/@test)