Element 'ram:RoleCode' may occur at maximum 1 times.
RoleCode occurs more than once in BuyerTradeParty. The element may appear at most once in this context.
RoleCode describes the role of the buyer party. The rule limits this to at most one role code.
The buyer details contain RoleCode more than once. You can adjust the XML structure so that there is no more than one such element.
- Locate the repeated
RoleCodeelements inBuyerTradeParty. - Make sure that no more than one
RoleCoderemains there. - Regenerate the invoice and validate it again.
<ram:BuyerTradeParty> <ram:RoleCode/> <ram:RoleCode/> </ram:BuyerTradeParty>
<ram:BuyerTradeParty> <ram:RoleCode/> </ram:BuyerTradeParty>
Technical details
The test counts the direct RoleCode elements under BuyerTradeParty and requires a count of at most 1.
The rule applies within BuyerTradeParty.
rule/@context)assert/@test)