public class Inversion extends Object
Inversion
object that represents the
path through the expression tree containing expressions that are evaluated in push mode, that is,
those that perform downward navigation in the streamed document input.
The expression inversion is represented by a "streaming route", which is the path of nodes in the expression tree, from the root to a leaf, being evaluated in streaming mode. The streaming route starts with a Watch, which is notified by the parser of interesting events. It then proceeds through a series of Feeds which process these events (or items composed from these events) before finally being output to a Receiver which handles the transformation result.
The list of actions is "outermost expression first". This is the opposite of the order in which the events actually pass through the pipeline.
Modifier and Type | Class and Description |
---|---|
static class |
Inversion.PushAction
A PushAction is a collection of data that together represents the strategy for how an expression should be
evaluated in push mode.
|
Constructor and Description |
---|
Inversion() |
Modifier and Type | Method and Description |
---|---|
void |
append(Inversion.PushAction action)
Add an action to the end of the streaming route (a subexpression of the currently-last expression,
which is therefore first to receive events from the parser)
|
Inversion |
copy()
Create a copy of this inverted expression
|
void |
explain(ExpressionPresenter out)
Display the streaming route for diagnostic purposes
|
List<Inversion.PushAction> |
getRoute()
Get the list of push actions making up the streaming route
|
Watch |
getWatch(WatchManager watchManager,
Feed parentFeed,
Stack<XPathContext> contextStack)
Make a Watch to represent this streaming route.
|
void |
prepend(Inversion.PushAction action)
Add an action to the start of this streaming route (a parent of the currently-first expression,
which is therefore last to receive events from the parser)
|
public Inversion copy()
public void append(Inversion.PushAction action)
action
- the action to be appendedpublic void prepend(Inversion.PushAction action)
action
- the action to be prependedpublic List<Inversion.PushAction> getRoute()
public Watch getWatch(WatchManager watchManager, Feed parentFeed, Stack<XPathContext> contextStack) throws XPathException
watchManager
- the WatchManager (which is known to each Watch under its control)parentFeed
- Maybe null. The destination of events after processing by this WatchcontextStack
- stack of XPath context objects; always use the top oneXPathException
- if an error occurs, e.g. if streaming is not possible.public void explain(ExpressionPresenter out)
out
- the display destinationCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.