throw new XPathException("union operand is not a node sequence"); NodeSet result = lval.toNodeSet().union(rval.toNodeSet());  return result;
throw new XPathException(getASTNode(), "union operand is not a node sequence"); boolean convertToNodeSet = lval.isPersistentSet() && rval.isPersistentSet(); if (convertToNodeSet) { return lval.toNodeSet().union(rval.toNodeSet()); } else { ValueSequence result = new ValueSequence(); result.addAll(lval); result.addAll(rval); return result; }
	public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException {		Sequence lval = left.eval(contextSequence, contextItem);		Sequence rval = right.eval(contextSequence, contextItem);		long start = System.currentTimeMillis();		if(lval.getLength() == 0)		    return rval;		if(rval.getLength() == 0)		    return lval;		if(!(Type.subTypeOf(lval.getItemType(), Type.NODE) && Type.subTypeOf(rval.getItemType(), Type.NODE)))			throw new XPathException("union operand is not a node sequence");        NodeSet result = lval.toNodeSet().union(rval.toNodeSet());//        LOG.debug("Union took " + (System.currentTimeMillis() - start));		return result;	}