StaticContext context,
	public Sequence eval(		StaticContext context,		DocumentSet docs,		Sequence contextSequence,		Item contextItem)		throws XPathException {		Sequence result;		//if (returnExpr.returnsType() == Type.NODE) {		//	result = new ExtArrayNodeSet();		//} else {		result = new ValueSequence();		//}		// declare the variable		Variable var = new Variable(QName.parse(context, varName));		context.declareVariable(var);		// evaluate the "in" expression		Sequence in = inputSequence.eval(context, docs, null, null);		var.setValue(in);		if(whereExpr != null)			whereExpr.setInPredicate(true);		if(whereExpr != null && 			( whereExpr.getDependencies() & Dependency.CONTEXT_ITEM ) == 0) {			LOG.debug("using single walk-through");			setContext(in);			in = applyWhereExpression(context, docs, null);			whereExpr = null;		}		Sequence val = null;		// loop through each variable binding		for (SequenceIterator i = in.iterate(); i.hasNext();) {			contextItem = i.nextItem();			if(contextItem instanceof NodeProxy)				((NodeProxy)contextItem).addContextNode((NodeProxy)contextItem);			contextSequence = contextItem.toSequence();			var.setValue(contextSequence);			if (whereExpr != null) {				val = applyWhereExpression(context, docs, contextSequence);				if(val.getLength() == 0)					continue;			} else				val = contextItem.toSequence();			val = returnExpr.eval(context, docs, val);			result.addAll(val);		}		return result;	}