Element 'ram:RoleCode' may occur at maximum 1 times.
ram:RoleCode occurs more than once in ram:ShipToTradeParty.
ram:RoleCode specifies a role of the ship-to party. The rule limits this element to at most one occurrence.
ram:RoleCode is provided more than once for the ship-to party. You can adjust the invoice so that it contains no more than one such element there.
- Find
ram:ShipToTradePartyfor the delivery address of the invoice line. - Count the
ram:RoleCodeelements it contains and remove any extra occurrences. - Regenerate the invoice and validate it again.
<ram:ShipToTradeParty> <ram:RoleCode>A</ram:RoleCode> <ram:RoleCode>B</ram:RoleCode> </ram:ShipToTradeParty>
<ram:ShipToTradeParty> <ram:RoleCode>A</ram:RoleCode> </ram:ShipToTradeParty>
Technical details
The test counts the direct ram:RoleCode elements under ram:ShipToTradeParty and passes when their count is at most one.
The rule applies to ram:ShipToTradeParty for the delivery address of an invoice line.
rule/@context)assert/@test)