Sequence rs = getRight().eval(context.getNode().toSequence()); if (!rs.hasOne()) throw new XPathException(getASTNode(), "Type error: sequence with less or more than one item is not allowed here"); Collator collator = getCollator(contextSequence); if (compareValues(collator, lv, rs.itemAt(0).atomize())) result.add(current); } while ((context = context.getNextDirect()) != null); } return result;
if (compareValues(collator, lv, rv)) result.add(current); } } return result;
	protected Sequence nodeSetCompare(NodeSet nodes, Sequence contextSequence) throws XPathException {		NodeSet result = new ExtArrayNodeSet();			for (Iterator i = nodes.iterator(); i.hasNext();) {            NodeProxy current = (NodeProxy) i.next();			            ContextItem context = current.getContext();			do {                AtomicValue lv = current.atomize();                Sequence rs = getRight().eval(context.getNode().toSequence());				if (!rs.hasOne())					throw new XPathException(getASTNode(), "Type error: sequence with less or more than one item is not allowed here");                Collator collator = getCollator(contextSequence);                if (compareValues(collator, lv, rs.itemAt(0).atomize()))					result.add(current);			} while ((context = context.getNextDirect()) != null);		}		return result;	}