February 2004
Intermediate to advanced
544 pages
9h 55m
English
Most programming languages adopt one of two styles of expressions: iteration or application. Iterative expressions explicitly loop through sequences one member at a time. Applicative expressions apply operations to entire sequences at once (implicitly iterating through the sequence and applying the operation to each member).
As we saw in Chapter 3, navigation paths have an applicative style—each step implicitly iterates over the nodes selected by the previous step. However, the rest of XQuery has adopted an iterative style of programming. This chapter explores the XQuery expressions that perform iteration.
The FLWOR (pronounced “flower”) expression is the most powerful of these, capable of introducing variables, ...