[MOD] XQuery, Database Module. Closes #870