Element 'ram:RoleCode' may occur at maximum 1 times.
ram:BuyerAgentTradeParty contains more than one ram:RoleCode. This element may occur at most once there.
The rule limits the buyer agent role information to no more than one ram:RoleCode element.
Several ram:RoleCode elements are present in ram:BuyerAgentTradeParty. The rule allows at most one there; a role code is not required.
- Locate
ram:BuyerAgentTradePartyin the invoice agreement section. - Remove any extra
ram:RoleCodeelements so that no more than one remains. - Generate the invoice again and validate it once more.
<ram:BuyerAgentTradeParty> <ram:RoleCode>A</ram:RoleCode> <ram:RoleCode>B</ram:RoleCode> </ram:BuyerAgentTradeParty>
<ram:BuyerAgentTradeParty> <ram:RoleCode>A</ram:RoleCode> </ram:BuyerAgentTradeParty>
Technical details
The test counts the direct ram:RoleCode elements under ram:BuyerAgentTradeParty and requires no more than 1; the element may be absent.
The rule applies to ram:RoleCode within ram:BuyerAgentTradeParty in the document-level agreement section.
rule/@context)assert/@test)