* @param c The context for evaluation
* @return a SequenceIterator representing the union of the two operands
*/
public SequenceIterator iterate(final XPathContext c) throws XPathException {
SequenceIterator i1 = operand0.iterate(c);
//return Type.isNodeType(getItemType()) && isSingleton();
// this is a sufficient condition, but other expressions override this method
if ((operand0.getSpecialProperties() & StaticProperty.ORDERED_NODESET) == 0) {
i1 = new DocumentOrderIterator(i1, GlobalOrderComparer.getInstance());
}
SequenceIterator i2 = operand1.iterate(c);
//return Type.isNodeType(getItemType()) && isSingleton();
// this is a sufficient condition, but other expressions override this method
if ((operand1.getSpecialProperties() & StaticProperty.ORDERED_NODESET) == 0) {
i2 = new DocumentOrderIterator(i2, GlobalOrderComparer.getInstance());
}