List terms = getSearchTerms(context, contextSequence); return evalQuery(context, nodes, terms);
List terms = getSearchTerms(contextSequence); Sequence result = evalQuery(nodes, terms); if(canCache && contextSequence instanceof NodeSet) cached = new CachedResult((NodeSet)contextSequence, result); return result;
	public Sequence eval(		Sequence contextSequence,		Item contextItem)		throws XPathException {		if(getArgumentCount() < 2)			throw new XPathException(getASTNode(), "function requires at least two arguments");		if (contextItem != null)			contextSequence = contextItem.toSequence();		Expression path = getArgument(0);		if ((getDependencies() & Dependency.CONTEXT_ITEM) == Dependency.NO_DEPENDENCY) {			NodeSet nodes =				path == null					? contextSequence.toNodeSet()					: path.eval(contextSequence).toNodeSet();			List terms = getSearchTerms(context, contextSequence);			return evalQuery(context, nodes, terms);		} else {			Item current;			String arg;			NodeSet nodes;			NodeSet result = new ExtArrayNodeSet();			Sequence temp;			for (SequenceIterator i = contextSequence.iterate();				i.hasNext();				) {				current = i.nextItem();				List terms = getSearchTerms(context, current.toSequence());				long start = System.currentTimeMillis();				nodes =					path == null						? contextSequence.toNodeSet()						: path							.eval(current.toSequence())							.toNodeSet();				temp = evalQuery(context, nodes, terms);				result.addAll(temp);				LOG.debug(					"found "						+ temp.getLength()						+ " in "						+ (System.currentTimeMillis() - start));			}			return result;		}	}