Hong Kong's leader says Chinese President Xi Jinping has affirmed his handling of a political dispute in the Chinese-ruled territory in which two independent legislators were barred from taking their seats.

Chief Executive Leung Chun-ying said Xi had "fully affirmed our work" in a meeting on the sidelines of the Asia Pacific Economic Cooperation forum in Lima, Peru.

Leung said Xi referred to the decision to refuse to seat two elected members of Hong Kong's Legislative Council for using anti-China insults and foul language while taking their oaths. Xi has not publicly commented on the controversy.

Beijing handed down its own interpretation of the semi-autonomous region's mini-constitution to disqualify the two, circumventing Hong Kong's courts and raising fears over the city's wide autonomy and independent judiciary.