[MIN] Cleanups
[MIN] Grammar in documentation
[FIX] XQuery, static typing in predicates. Fixes #1016.