replace element id with a expression