Remove duplication in xpath function declarations