* and mapped to alternative markup. This implementation deems an
* outer table a candidate for removal if it has a single column, if there
* is a mapper defined by the factory.
*/
private void removeRedundantTables() {
AbridgedTransMapper mapper = getFactory().getMapper(protocol);
if (mapper != null) {
// Look for all top-level single column tables and remove those
// that have nested table content. The array size may vary during
// processing, never shrinking but potentially growing on each
// iteration
int i = 0;
while (i < tables.size()) {
TransTable table = (TransTable)tables.get(i);
if (getRemoveTableRule().canRemoveTable(table)) {
int row;
// Re-map the top-level table
mapper.remap(table.getElement(),
getFactory().getElementHelper(),
true);
// "Promote" the nested tables, adding them to the end
// of the tables array so they can be processed in turn