replaced ids with references to xml ids