if(lval.getItemType() != Type.NODE || rval.getItemType() != Type.NODE) throw new XPathException("except operand is not a node sequence"); NodeSet result = lval.toNodeSet().except(rval.toNodeSet()); return result;
if(!(Type.subTypeOf(lval.getItemType(), Type.NODE) && Type.subTypeOf(rval.getItemType(), Type.NODE))) throw new XPathException(getASTNode(), "except operand is not a node sequence"); if (lval.isPersistentSet() && rval.isPersistentSet()) return lval.toNodeSet().except(rval.toNodeSet()); else { ValueSequence result = new ValueSequence(); Set set = new TreeSet(); for (SequenceIterator i = rval.unorderedIterator(); i.hasNext(); ) set.add(i.nextItem()); for (SequenceIterator i = lval.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(rval.getLength() == 0 || lval.getLength() == 0)		    return lval;		if(lval.getItemType() != Type.NODE || rval.getItemType() != Type.NODE)			throw new XPathException("except operand is not a node sequence");		NodeSet result = lval.toNodeSet().except(rval.toNodeSet());		return result;	}