[FIX] XQuery: adding attributes with namespaces. Closes #956.
Merge branch 'stable'