com.icl.saxon.expr

Class ErrorExpression

public class ErrorExpression extends Expression

Error expression: this expression is generated when the supplied expression cannot be parsed, and the containing element enables forwards-compatible processing. It defers the generation of an error message until an attempt is made to evaluate the expression
Constructor Summary
ErrorExpression(XPathException exception)
Constructor
Method Summary
voiddisplay(int level)
Diagnostic print of expression structure
Valueevaluate(Context c)
Evaluate this expression.
intgetDataType()
Determine the data type of the expression, if possible
intgetDependencies()
Determine which aspects of the context the expression depends on.
Expressionreduce(int dependencies, Context context)
Perform a partial evaluation of the expression, by eliminating specified dependencies on the context.

Constructor Detail

ErrorExpression

public ErrorExpression(XPathException exception)
Constructor

Parameters: exception the error found when parsing this expression

Method Detail

display

public void display(int level)
Diagnostic print of expression structure

evaluate

public Value evaluate(Context c)
Evaluate this expression. This always throws the exception registered when the expression was first parsed.

getDataType

public int getDataType()
Determine the data type of the expression, if possible

Returns: Value.ANY (meaning not known in advance)

getDependencies

public int getDependencies()
Determine which aspects of the context the expression depends on. The result is a bitwise-or'ed value composed from constants such as Context.VARIABLES and Context.CURRENT_NODE

reduce

public Expression reduce(int dependencies, Context context)
Perform a partial evaluation of the expression, by eliminating specified dependencies on the context.

Parameters: dependencies The dependencies to be removed context The context to be used for the partial evaluation

Returns: a new expression that does not have any of the specified dependencies