com.jclark.xsl.expr
Class ConvertibleNodeSetExpr

java.lang.Object
  extended by com.jclark.xsl.expr.ConvertibleExpr
      extended by com.jclark.xsl.expr.ConvertibleNodeSetExpr
All Implemented Interfaces:
NodeSetExpr
Direct Known Subclasses:
AxisExpr, ComposeExpr, FilterExpr, NodeConstantExpr, NodeTestExpr, RootExpr, SequenceComposeExpr, SubtreeExpr, UnionExpr

abstract class ConvertibleNodeSetExpr
extends ConvertibleExpr
implements NodeSetExpr

A compiled XPath pattern component which returns a Node set, but is convertible (castable) to a String expression, boolean expression or VariantExpression


Field Summary
(package private) static int SINGLE_LEVEL
          If this is set, then all nodes in the result of eval(x, c) are guaranteed to be at the same level of the tree.
(package private) static int STAYS_IN_SUBTREE
          If this is set, then all nodes in the result of eval(x, c) are guaranteed to be in the subtree rooted at x.
 
Constructor Summary
ConvertibleNodeSetExpr()
           
 
Method Summary
(package private)  ConvertibleNodeSetExpr compose(ConvertibleNodeSetExpr expr)
          Return an expression for this/expr
(package private)  Pattern getChildrenNodePattern()
           
(package private)  int getOptimizeFlags()
           
(package private)  ConvertibleBooleanExpr makeBooleanExpr()
          cast it as a boolean expression
(package private)  ConvertibleNodeSetExpr makeNodeSetExpr()
          cast it as a NodeSet expression (by default, don't)
(package private)  ConvertibleStringExpr makeStringExpr()
          cast it as a String expression
(package private)  ConvertibleVariantExpr makeVariantExpr()
          cast it as a Variant (a variable or param you can bind to a name) expression
 
Methods inherited from class com.jclark.xsl.expr.ConvertibleExpr
makeNumberExpr, makePredicateExpr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jclark.xsl.expr.NodeSetExpr
eval
 

Field Detail

STAYS_IN_SUBTREE

static final int STAYS_IN_SUBTREE
If this is set, then all nodes in the result of eval(x, c) are guaranteed to be in the subtree rooted at x.

See Also:
Constant Field Values

SINGLE_LEVEL

static final int SINGLE_LEVEL
If this is set, then all nodes in the result of eval(x, c) are guaranteed to be at the same level of the tree. More precisely, define the level of a node to be the number of ancestors it has, and then define an expression to be single-level if and only if there exists an integer n such that for any node x, for any node y in the result of evaluating the expression with respect to x, the difference between the level of x and the level of y is equal to n. For example, the children axis is single-level but the descendants axis is not.

See Also:
Constant Field Values
Constructor Detail

ConvertibleNodeSetExpr

ConvertibleNodeSetExpr()
Method Detail

makeStringExpr

ConvertibleStringExpr makeStringExpr()
Description copied from class: ConvertibleExpr
cast it as a String expression

Specified by:
makeStringExpr in class ConvertibleExpr

makeBooleanExpr

ConvertibleBooleanExpr makeBooleanExpr()
Description copied from class: ConvertibleExpr
cast it as a boolean expression

Specified by:
makeBooleanExpr in class ConvertibleExpr

makeNodeSetExpr

ConvertibleNodeSetExpr makeNodeSetExpr()
Description copied from class: ConvertibleExpr
cast it as a NodeSet expression (by default, don't)

Overrides:
makeNodeSetExpr in class ConvertibleExpr

makeVariantExpr

ConvertibleVariantExpr makeVariantExpr()
Description copied from class: ConvertibleExpr
cast it as a Variant (a variable or param you can bind to a name) expression

Specified by:
makeVariantExpr in class ConvertibleExpr

getOptimizeFlags

int getOptimizeFlags()

compose

ConvertibleNodeSetExpr compose(ConvertibleNodeSetExpr expr)
Return an expression for this/expr


getChildrenNodePattern

Pattern getChildrenNodePattern()