BaseX is great. It's impressive what the single developer has achieved and improved over many years already. At NLnet, my employer, we use it to generate our mostly static website. Since it produces well-formed XML as output, there is no possibility of undetected nesting errors due to typos. XQuery is a functional language so it's simpler to reason about the code: variables are immutable.
An area of improvement would be type checking. XQuery allows defining types via XML Schema, but there is no mature open source implementation that can check the types on each function. BaseX does support validation ad-hoc by calling a validation function explicitly.