public class ExpressionInverter extends Object
Constructor and Description |
---|
ExpressionInverter(Configuration config) |
Modifier and Type | Method and Description |
---|---|
static boolean |
consumesGroup(Expression exp) |
static boolean |
consumesStream(Expression exp)
Ask whether an expression is consuming.
|
static int |
getStreamability(Expression exp,
int syntacticContext,
boolean allowExtensions,
List<String> reasons)
Implement the default streamability rules for an expression.
|
Inversion |
invertExpression(Expression exp)
Compute the Jackson inversion of an expression.
|
static boolean |
isUpwardsExpression(Expression exp)
Test whether an expression returns an ancestor of the context node
|
static boolean |
returnsStreamedNode(Expression exp)
Test whether an expression returns a node in the streamed document (that is, the same document
as the context node)
|
public ExpressionInverter(Configuration config)
public Inversion invertExpression(Expression exp) throws XPathException
exp
- the expression to be invertedXPathException
- if the expression is not streamablepublic static int getStreamability(Expression exp, int syntacticContext, boolean allowExtensions, List<String> reasons)
exp
- the expression being analyzedsyntacticContext
- one of the values Expression.NAVIGATION_CONTEXT
,
Expression.NODE_VALUE_CONTEXT
, Expression.INHERITED_CONTEXT
,
Expression.INSPECTION_CONTEXT
allowExtensions
- if false, the definition of "guaranteed streamability" in the
W3C specification is used. If true, Saxon extensions are permitted, which make somereasons
- the caller may supply a list, in which case the implementation may add to this
list a message explaining why the construct is not streamable, suitable for inclusion in an
error message.Expression.W3C_MOTIONLESS
, Expression.W3C_CONSUMING
,
Expression.W3C_GROUP_CONSUMING
, Expression.W3C_FREE_RANGING
public static boolean consumesStream(Expression exp)
exp
- the expression to be testedpublic static boolean consumesGroup(Expression exp)
public static boolean returnsStreamedNode(Expression exp)
exp
- the expression being examinedpublic static boolean isUpwardsExpression(Expression exp)
exp
- the expression being examinedCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.