[MOD] XQuery: revised typing (considering array semantics)