let $comp-key := function($city) { concat($city/@country, ', ', $city/@name) } return distinct-values(cities/city!$comp-key(.))