Element 'ram:RoleCode' may occur at maximum 1 times.
ram:RoleCode appears more than once in ram:ShipFromTradeParty. The test allows this element at most once.
The limit prevents multiple role codes from being provided for the same consignor.
ram:RoleCode has been provided more than once for the consignor. This element may appear no more than once in this section.
- Find
ram:ShipFromTradePartyin the delivery details. - Check the
ram:RoleCodeelements it contains and remove any extra occurrences. - Generate the invoice again and validate it once more.
<ram:ShipFromTradeParty> <ram:RoleCode>A</ram:RoleCode> <ram:RoleCode>B</ram:RoleCode> </ram:ShipFromTradeParty>
<ram:ShipFromTradeParty> <ram:RoleCode>A</ram:RoleCode> </ram:ShipFromTradeParty>
Technical details
The XPath test counts the direct ram:RoleCode elements within ram:ShipFromTradeParty and requires the count to be no greater than one.
The rule applies to ram:RoleCode within ram:ShipFromTradeParty.
rule/@context)assert/@test)