rr = (NodeSet) getExpression(i).eval(context, docs, contextSequence, contextItem);
rr = (NodeSet) getExpression(i).eval(docs, contextSequence, contextItem);
	public Sequence eval(StaticContext context, DocumentSet docs, Sequence contextSequence, 		Item contextItem) throws XPathException {		if (getLength() == 0)			return Sequence.EMPTY_SEQUENCE;				boolean nodeSetCompare = true;		for(int i = 0; i < getLength(); i++) {			if(!Type.subTypeOf(getExpression(i).returnsType(), Type.NODE))				nodeSetCompare = false;		}				if(nodeSetCompare) {			NodeSet rr, rl = (NodeSet) getExpression(0).eval(context, docs, contextSequence, contextItem);			rl = rl.getContextNodes((NodeSet)contextSequence, inPredicate);			for (int i = 1; i < getLength(); i++) {				LOG.debug("processing " + getExpression(i).pprint());				rr = (NodeSet) getExpression(i).eval(context, docs, contextSequence, contextItem);				rl = rl.intersection(rr.getContextNodes((NodeSet)contextSequence, inPredicate));			}			return rl;		} else {			Sequence result;			if(Type.subTypeOf(contextSequence.getItemType(), Type.NODE))				result = new ExtArrayNodeSet();			else				result = new ValueSequence();			Item item;			boolean r;			for(SequenceIterator i = contextSequence.iterate(); i.hasNext(); ) {				item = i.nextItem();				r = true;				for(int j = 0; j < getLength(); j++) {					r = ((BooleanValue)getExpression(j).eval(context, docs, contextSequence, item).convertTo(Type.BOOLEAN)).getValue();					if(!r)						break;				}				if(r)					result.add(item);			}			return result;		}	}