Package net.sf.saxon.expr.flwor
This package contains classes responsible for evaluation of FLWOR expressions, in particular, those clauses of FLWOR expressions that are supported in Saxon-HE.
FLWOR expressions are implemented as a pipeline of clauses, much as described in the specification. The pipeline can be evaluated in push or pull mode: in push mode, the supplier of tuples activates the consumer of tuples when a tuple is ready to be processed, while in pull mode, the consumer of tuples calls the supplier to request the next tuple. In both cases the "tuple" is not actually passed as an argument or result of this call, but is represented by the state of local variables in the XPathContext stack on completion of the call. The only time tuples are represented as real objects is when the processing is not pipelined, for example when tuples need to be sorted or grouped.
Simple "for" and "let" expressions do not use this mechanism: instead, they are compiled to a ForExpression or LetExpression.
Michael H. Kay
Saxonica Limited
28 November 2011
-
Interface Summary Interface Description ExpressionProcessor -
Class Summary Class Description Clause A "Clause" refers specifically to one of the clauses of a FLWOR expression, for example the "for" clause, the "let" clause, the "where" or "order by" clause.ClauseInfo A "trace" clause in a FLWOR expression, added by a TraceCodeInjectorFLWORExpression This class represents a FLWOR expression, evaluated using tuple streamsForClause A "for" clause in a FLWOR expressionForClauseOuterPull This class represents the tuple stream returned by a "for" clause in a FLWOR expressionForClauseOuterPush This class implements the changes to the tuple stream effected by a "for" clause in a FLWOR expression where "allowing empty" is specifiedForClausePull This class implements the changes to the tuple stream effected by a "for" clause in a FLWOR expressionForClausePush This class implements the changes to the tuple stream effected by a "for" clause in a FLWOR expressionLetClause A "let" clause in a FLWOR expressionLetClausePull Implements the changes to a tuple stream effected by the Let clause in a FLWOR expressionLetClausePush Implements the changes to a tuple stream effected by the Let clause in a FLWOR expressionLocalVariableBinding Represents the defining occurrence of a variable declared within a FLWOR expression, for example the $p in "for $x at $p in ...".OrderByClause This class represents an "order by" clause in a FLWOR expressionOrderByClausePull Represents the tuple stream delivered by an "order by" clause.OrderByClausePush Represents the tuple stream delivered by an "order by" clause.ReturnClauseIterator This iterator applies the return expression of a FLWOR expression to each of the tuples in a supplied tuple stream, returning the result as an iteratorReturnClausePush The class represents the final stage in a push-mode tuple pipeline.SingularityPull The "singularity" tuple stream delivers a single empty tuple.TraceClause A "trace" clause in a FLWOR expression, added by a TraceCodeInjector for diagnostic tracing, debugging, profiling or similar purposes.TraceClausePull This class represents the tuple stream delivered as the output of a trace clause in a FLWOR expression.TraceClausePush This class represents the tuple stream delivered as the output of a trace clause in a FLWOR expression.Tuple A tuple, as it appears in an XQuery tuple stream handled by extended FLWOR expressions.TupleExpression A tuple expression is an expression that returns a tuple.TuplePull Abtract class representing a tuple stream (used to evaluate a FLWOR expression) in pull mode (where the consumer of tuples activates the provider of those tuples)TuplePush Abtract class representing a tuple stream (used to evaluate a FLWOR expression) in push mode (where the provider of tuples activates the consumer of those tuples)WhereClause A "where" clause in a FLWOR expressionWhereClausePull This class represents the tuple stream delivered as the output of a where clause in a FLWOR expression: that is, it returns all the tuples in its input stream that satisfy a specified predicate.WhereClausePush This class represents the tuple stream delivered as the output of a where clause in a FLWOR expression: that is, it supplies all the tuples in its input stream that satisfy a specified predicate.