Element 'ram:RoleCode' may occur at maximum 1 times.
The ram:ProductEndUserTradeParty contains more than one ram:RoleCode element.
ram:RoleCode is optional in this party element but may occur only once. Multiple role codes at this location do not conform to the required structure.
ram:RoleCode appears multiple times in ram:ProductEndUserTradeParty. The role code may appear at most once in this element.
- Find the relevant
ram:ProductEndUserTradeParty. - Remove any extra
ram:RoleCodeelements there, or omitram:RoleCodeif no role code is to be provided. - Generate the invoice again and validate it once more.
<ram:ProductEndUserTradeParty> <ram:RoleCode>1</ram:RoleCode> <ram:RoleCode>2</ram:RoleCode> </ram:ProductEndUserTradeParty>
<ram:ProductEndUserTradeParty> <ram:RoleCode>1</ram:RoleCode> </ram:ProductEndUserTradeParty>
Technical details
The test counts the direct ram:RoleCode elements in the current ram:ProductEndUserTradeParty and allows no more than one.
The rule applies to ram:RoleCode within ram:ProductEndUserTradeParty in the invoice agreement.
rule/@context)assert/@test)