union($seq2, $seq3)
from within a Java application, in order to extract the result from the result sequence, one would have to use this code:
for (Iterator iter = rs.iterator(); iter.hasNext();) {
Object item = iter.next();
String n = ((XSString)item).stringvalue();
print(n + ", ");
} println("");
which returns the sequence consisting of $item1, $item2, $item3.