Element 'ram:CountryID' must occur exactly 1 times.
CountryID is missing from the buyer agent’s PostalTradeAddress or occurs more than once. CountryID must appear exactly once.
The buyer agent’s postal address requires exactly one CountryID element to specify the country in the XML structure.
CountryID is missing or appears more than once in the buyer agent’s postal address. Exactly one CountryID element resolves this issue.
- Find
PostalTradeAddressinBuyerAgentTradeParty. - Make sure it contains exactly one
CountryIDelement. - Generate the invoice again and validate it once more.
<ram:BuyerAgentTradeParty> <ram:PostalTradeAddress/> </ram:BuyerAgentTradeParty>
<ram:BuyerAgentTradeParty> <ram:PostalTradeAddress> <ram:CountryID>DE</ram:CountryID> </ram:PostalTradeAddress> </ram:BuyerAgentTradeParty>
Technical details
The test counts the direct CountryID child elements of PostalTradeAddress and requires exactly one.
The rule applies to PostalTradeAddress within BuyerAgentTradeParty and the CountryID element it contains.
rule/@context)assert/@test)