Make the parse tree conform to the shr dom