Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="VA"]' may occur at maximum 2 times.
The same ram:ManufacturerTradeParty contains more than two ram:SpecifiedTaxRegistration elements whose child ram:ID has a schemeID attribute with the value VA.
The rule limits the number of tax registrations using scheme VA within the manufacturer element to two. Additional registrations using this scheme exceed the permitted maximum.
More than two tax registrations with schemeID="VA" are specified for the manufacturer. Reduce these entries to no more than two.
- Locate
ram:ManufacturerTradePartyfor the product on the invoice line. - Count the
ram:SpecifiedTaxRegistrationelements whoseram:IDhas the attributeschemeID="VA". - Keep no more than two of these elements.
- Generate the invoice again and validate it again.
<ram:ManufacturerTradeParty> <ram:SpecifiedTaxRegistration> <ram:ID schemeID="VA">A</ram:ID> </ram:SpecifiedTaxRegistration> <ram:SpecifiedTaxRegistration> <ram:ID schemeID="VA">B</ram:ID> </ram:SpecifiedTaxRegistration> <ram:SpecifiedTaxRegistration> <ram:ID schemeID="VA">C</ram:ID> </ram:SpecifiedTaxRegistration> </ram:ManufacturerTradeParty>
<ram:ManufacturerTradeParty> <ram:SpecifiedTaxRegistration> <ram:ID schemeID="VA">A</ram:ID> </ram:SpecifiedTaxRegistration> <ram:SpecifiedTaxRegistration> <ram:ID schemeID="VA">B</ram:ID> </ram:SpecifiedTaxRegistration> </ram:ManufacturerTradeParty>
Technical details
The test counts ram:SpecifiedTaxRegistration elements within ram:ManufacturerTradeParty whose direct ram:ID has the value VA in @schemeID, and requires a count of no more than two.
This rule applies to ram:SpecifiedTaxRegistration within ram:ManufacturerTradeParty for a product on an invoice line.
rule/@context)assert/@test)