System.out.println("SINGLE");
	protected Sequence applyWhereExpression(		Sequence contextSequence)		throws XPathException {		whereExpr.setInPredicate(true);		if (Type.subTypeOf(whereExpr.returnsType(), Type.NODE) &&			(contextSequence == null || 			Type.subTypeOf(contextSequence.getItemType(), Type.NODE))) {			// if the where expression returns a node set, check the context			// node of each node in the set			NodeSet temp = whereExpr.eval(contextSequence).toNodeSet();			NodeProxy current;			ContextItem contextNode;			NodeProxy next;			DocumentImpl lastDoc = null;			int count = 0, sizeHint = -1;			NodeSet result = new ExtArrayNodeSet();			for (Iterator i = temp.iterator(); i.hasNext(); count++) {				current = (NodeProxy) i.next();				if (lastDoc == null || current.doc != lastDoc) {					lastDoc = current.doc;					sizeHint = temp.getSizeHint(lastDoc);				}				contextNode = current.getContext();				if (contextNode == null) {					throw new XPathException("Internal evaluation error: context node is missing!");				}				while (contextNode != null) {					next = contextNode.getNode();					next.addMatches(current.match);					if (!result.contains(next))						result.add(next, sizeHint);					contextNode = contextNode.getNextItem();				}			}			return result;		} else if (contextSequence == null) {			Sequence innerSeq = whereExpr.eval(null);			return innerSeq.effectiveBooleanValue() ? BooleanValue.TRUE : BooleanValue.FALSE;		} else {			// general where clause: just check the effective boolean value			ValueSequence result = new ValueSequence();			int p = 0;			context.setContextPosition(0);			for (SequenceIterator i = contextSequence.iterate();				i.hasNext();				p++) {				Item item = i.nextItem();				context.setContextPosition(p);				Sequence innerSeq = whereExpr.eval(contextSequence, item);				if (innerSeq.effectiveBooleanValue())					result.add(item);			}			return result;		}	}