> > But that is the entire source of the befuddlement. There is nothing I can see > that says that the input tuple stream of the order by is sourced from the > group by (unless there is some presumption consequent on the juxtaposition of > the statements). So I read it as meaning that the input tuple stream to the > order by must be the pre-grouping tuple stream.
The relevant statement is in the introduction to FLWOR expressions in 3.10: Conceptually, the initial clause generates a tuple stream. Each intermediate clause takes the tuple stream generated by the previous clause as input and generates a (possibly different) tuple stream as output. However, it is possibly confusing that in this sentence, "the initial clause" means "the first clause", while "Each intermediate clause" means each clause after the first, before the "return". That is, they don't mean the same as InitialClause and IntermediateClause in the grammar. I'll raise a bug on this. Michael Kay Saxonica
_______________________________________________ [email protected] http://x-query.com/mailman/listinfo/talk
