Complex sentence: In 1889 he was appointed Attorney General of Hong Kong and served in that capacity until 1902 when he was appointed Chief Justice of Hong Kong.
Split into simpler sentences: In 1889 he was appointed Attorney General of Hong Kong and served in that capacity until 1902. In 1902, he was appointed Chief Justice of Hong Kong.