According to the new draft of the W3C about Xquery, a Sortby expression must return a single value for every context, otherwise an error should be raised. Quip, however, chooses to ignore the expression in this cases and produces a result anyway.
Consider for example the following query:
document(“data\tree-data.xml”)/book/section Sortby (…/author)
The book has more than one author, so an error should be raised.