LOG.debug("processing " + getExpression(0).pprint()); NodeSet rr, rl = (NodeSet) getExpression(0).eval(docs, contextSequence, null); rl = rl.getContextNodes((NodeSet)contextSequence, inPredicate); for (int i = 1; i < getLength(); i++) { LOG.debug("processing " + getExpression(i).pprint()); rr = (NodeSet) getExpression(i).eval(docs, contextSequence, null);
if(contextItem != null) contextSequence = contextItem.toSequence(); Expression left = getLeft(); Expression right = getRight(); if(Type.subTypeOf(left.returnsType(), Type.NODE) && Type.subTypeOf(right.returnsType(), Type.NODE)) { NodeSet rl = left.eval(docs, contextSequence, null).toNodeSet(); rl = rl.getContextNodes((NodeSet)contextSequence, inPredicate); NodeSet rr = right.eval(docs, contextSequence, null).toNodeSet();
	public Sequence eval(DocumentSet docs, Sequence contextSequence, Item contextItem) throws XPathException {		if (getLength() == 0)			return Sequence.EMPTY_SEQUENCE;		LOG.debug("processing " + getExpression(0).pprint());		NodeSet rr, rl = (NodeSet) getExpression(0).eval(docs, contextSequence, null);		rl = rl.getContextNodes((NodeSet)contextSequence, inPredicate);		for (int i = 1; i < getLength(); i++) {			LOG.debug("processing " + getExpression(i).pprint());			rr = (NodeSet) getExpression(i).eval(docs, contextSequence, null);			rl = rl.union(rr.getContextNodes((NodeSet)contextSequence, inPredicate));		}		return rl;	}