move all xpath work to compile time to make runtime snappier