while ( rs.next() ) {
Collection c = rs.getResultCollection();
sw.write(RESULT_START);
if ( c != col )
writeStrings(sw, new String[]{" ", COL, "=\"", c.getCanonicalName(), "\""});
Key key = rs.getResultKey();
if ( key != null && key.getLength() > 0 )
writeStrings(sw, new String[]{" ", KEY, "=\"", key.toString(), "\""});
sw.write(">");
DocumentTable table = rs.getResult();
DTSMHelper.tableToWriter(table, sw, true);
sw.write(RESULT_END);