Bulk Evaluation of XQuery: An all-at-once approach to user-defined functions