throw new XPathException("intersect operand is not a node sequence"); NodeSet result = lval.toNodeSet().intersection(rval.toNodeSet()); return result;
throw new XPathException(getASTNode(), "intersect operand is not a node sequence");  if (lval.isPersistentSet() && rval.isPersistentSet()) return lval.toNodeSet().intersection(rval.toNodeSet()); else { ValueSequence result = new ValueSequence(); Set set = new TreeSet(); for (SequenceIterator i = lval.unorderedIterator(); i.hasNext(); ) set.add(i.nextItem()); for (SequenceIterator i = rval.unorderedIterator(); i.hasNext(); ) { Item next = i.nextItem(); if (set.contains(next)) result.add(next); } return result; }
	public Sequence eval(Sequence contextSequence, Item contextItem)		throws XPathException {			Sequence lval = left.eval(contextSequence, contextItem);			Sequence rval = right.eval(contextSequence, contextItem);			if(lval.getLength() == 0 || rval.getLength() == 0)			    return Sequence.EMPTY_SEQUENCE;			if(!(Type.subTypeOf(lval.getItemType(), Type.NODE) && Type.subTypeOf(rval.getItemType(), Type.NODE)))				throw new XPathException("intersect operand is not a node sequence");			NodeSet result = lval.toNodeSet().intersection(rval.toNodeSet());			return result;	}