net.sf.saxon.expr

Class ErrorExpression

public class ErrorExpression extends ComputedExpression

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
intcomputeCardinality()
Determine the static cardinality
voiddisplay(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure
ItemevaluateItem(XPathContext context)
Evaluate the expression.
ItemTypegetItemType(TypeHierarchy th)
Determine the data type of the expression, if possible
SequenceIteratoriterate(XPathContext context)
Iterate over the expression.
Expressionoptimize(Optimizer opt, StaticContext env, ItemType contextItemType)
ExpressiontypeCheck(StaticContext env, ItemType contextItemType)
Type-check the expression.

Constructor Detail

ErrorExpression

public ErrorExpression(XPathException exception)
Constructor

Parameters: exception the error found when parsing this expression

Method Detail

computeCardinality

public int computeCardinality()
Determine the static cardinality

display

public void display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure

evaluateItem

public Item evaluateItem(XPathContext context)
Evaluate the expression. This always throws the exception registered when the expression was first parsed.

getItemType

public ItemType getItemType(TypeHierarchy th)
Determine the data type of the expression, if possible

Parameters: th

Returns: Type.ITEM (meaning not known in advance)

iterate

public SequenceIterator iterate(XPathContext context)
Iterate over the expression. This always throws the exception registered when the expression was first parsed.

optimize

public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType)

typeCheck

public Expression typeCheck(StaticContext env, ItemType contextItemType)
Type-check the expression.