Generalized XQuery function loading