ordering relations first by xlink:role and then alphabetically by term