XQuery wrapper adapted