NodeSet result = new ExtArrayNodeSet(); NodeProxy current; ContextItem c; Sequence rs; AtomicValue lv, rv; for (Iterator i = nodes.iterator(); i.hasNext();) { current = (NodeProxy) i.next(); c = current.getContext(); do { lv = current.atomize(); rs = getRight().eval(c.getNode().toSequence()); for (SequenceIterator si = rs.iterate(); si.hasNext();) { if (compareValues(context, lv, si.nextItem().atomize())) { result.add(current); } } } while ((c = c.getNextItem()) != null); } return result;
NodeSet nodes = (NodeSet) getLeft().eval(contextSequence); return nodeSetCompare(nodes, contextSequence);
	protected Sequence nodeSetCompare(		NodeSet nodes,		Sequence contextSequence)		throws XPathException {		NodeSet result = new ExtArrayNodeSet();		NodeProxy current;		ContextItem c;		Sequence rs;		AtomicValue lv, rv;		for (Iterator i = nodes.iterator(); i.hasNext();) {			current = (NodeProxy) i.next();			c = current.getContext();			do {				lv = current.atomize();				rs = getRight().eval(c.getNode().toSequence());				for (SequenceIterator si = rs.iterate(); si.hasNext();) {					if (compareValues(context, lv, si.nextItem().atomize())) {						result.add(current);					}				}			} while ((c = c.getNextItem()) != null);		}		return result;	}