public Expression optimize(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException {
Expression exp = super.optimize(visitor, contextItemType);
if (exp == this) {
if (contextItemType.isAtomicType()) {
return new ContextItemExpression();
}
}
return exp;
}