reformat script references as xpath expressions