net.sf.saxon.functions
public class Root extends SystemFunction
Method Summary | |
---|---|
PathMap.PathMapNodeSet | addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
Add a representation of this expression to a PathMap. |
int | computeSpecialProperties()
Get the static properties of this expression (other than its type). |
Item | evaluateItem(XPathContext c)
Evaluate in a general context |
Expression | simplify(ExpressionVisitor visitor)
Simplify and validate. |
The default implementation of this method assumes that an expression does no navigation other than the navigation done by evaluating its subexpressions, and that the subexpressions are evaluated in the same context as the containing expression. The method must be overridden for any expression where these assumptions do not hold. For example, implementations exist for AxisExpression, ParentExpression, and RootExpression (because they perform navigation), and for the doc(), document(), and collection() functions because they create a new navigation root. Implementations also exist for PathExpression and FilterExpression because they have subexpressions that are evaluated in a different context from the calling expression.
Parameters: pathMap the PathMap to which the expression should be added pathMapNodeSet
Returns: the pathMapNode representing the focus established by this expression, in the case where this expression is the first operand of a path expression or filter expression. For an expression that does navigation, it represents the end of the arc in the path map that describes the navigation route. For other expressions, it is the same as the input pathMapNode.
Parameters: visitor an expression visitor