Element 'ram:ID' may occur at maximum 1 times.
ram:ID occurs more than once in ram:BuyerTradeParty. At most one such element is allowed; it may also be absent.
In this rule context, the buyer identifier is represented as a single optional element and must not be supplied more than once.
The buyer information contains ram:ID more than once. This element may appear there at most once, but it may also be omitted.
- Check
ram:BuyerTradePartyfor repeatedram:IDelements. - Remove any additional
ram:IDelements or omit the element. - Generate the invoice again and validate it again.
<ram:BuyerTradeParty> <ram:ID>BUYER-1</ram:ID> <ram:ID>BUYER-2</ram:ID> </ram:BuyerTradeParty>
<ram:BuyerTradeParty> <ram:ID>BUYER-1</ram:ID> </ram:BuyerTradeParty>
Technical details
The XPath test count(ram:ID)<=1 limits the number of direct ram:ID child elements to at most one.
The rule applies to the ram:ID elements in ram:BuyerTradeParty of the agreement between seller and buyer.
rule/@context)assert/@test)