Element 'ram:RoleCode' may occur at maximum 1 times.
ram:RoleCode occurs more than once in ram:BuyerTradeParty. The element may occur at most once; it may also be absent.
In this context, the buyer information allows at most one role code, preventing multiple role codes from being listed for the same buyer.
The buyer information contains ram:RoleCode more than once. The element may occur at most once and may also be omitted.
- Check
ram:BuyerTradePartyfor repeatedram:RoleCodeelements. - Remove any additional
ram:RoleCodeelements or omit the element. - Generate the invoice again and validate it again.
<ram:BuyerTradeParty> <ram:RoleCode>A</ram:RoleCode> <ram:RoleCode>B</ram:RoleCode> </ram:BuyerTradeParty>
<ram:BuyerTradeParty> <ram:RoleCode>A</ram:RoleCode> </ram:BuyerTradeParty>
Technical details
The XPath test count(ram:RoleCode)<=1 limits the number of direct ram:RoleCode child elements to at most one.
The rule applies to ram:RoleCode within the buyer information ram:BuyerTradeParty.
rule/@context)assert/@test)