OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: merging nested tables with surrounding table


Dear TC,

During our last conference call, we discussed whether we needed explicit 
support for merging a nested table with the surrounding table as an 
alternative to rowspan/colspan attributes. Up until now, this was 
achieved with the is-subtable attribute, which instructed the 
application to treat the nested table such that it further partitioned 
the cell into which it was embedded.

The rationale for using nested tables for splits was that the resulting 
structure is less complex then using rowspan/colspan in order to create 
the same visual effect. I took an action item to investigate whether 
this kind of merged subtable was supported in HTML/CSS as an alternative 
to rowspan/colspan.

Consider the following table:
----------------------
| A1 | B1            |
----------------------
| A2 | B2.A1 | B2.B1 |
----------------------

Using colspan, one would create markup such as:
<table>
   <tr><td>A1</td><td colspan="2">B1</td></tr>
   <tr><td>A2</td><td>B2.A1</td><td>B2.B1</td></tr>
</table>

Using a nested table, one would create markup such as:
<table>
   <tr><td>A1</td><td>B1</td></tr>
   <tr>
     <td>A2</td>
     <td>
       <table>
          <tr><td>B2.A1</td><td>B2.B1</td></tr>
       </table>
     </td>
   </tr>
</table>

When using CSS properties to draw border around the table cells, the 
nested table can be distinguished from the surrounding table. This is 
shown in the attached example HTML document (test.html) and reproduced 
in Figure-1. The space between the outer cell and the nested table is 
called padding.
Furthermore, the border of the inner table is rendered and it is not 
possible to explicitly merge it with the surrounding border.

When the outer borders of the inner table are explicitly suppressed as 
shown in the lower part of the example and reproduced in Figure 2, the 
effect can be simulated. This however requires somewhat advanced CSS 
techniques (i.e pseudo-classes not supported by all browsers)

In conclusion, it is possible to simulate the desired rendition with CSS 
in HTML. However, there is no explicit support for visually merging a 
nested table with its surrounding cell.

I think it would be possible, to define a table style property in ODF, 
which specifies, that a surrounding cell border becomes the outer border 
for a nested table. I am unsure whether there is realy a requirement for 
such a feature as rowspan/colspan can be used to achieve the same visual 
result.

Furthermore, such a property might give raise to unpleasant edge-cases, 
such as two tables nested in one cell where on specifies the propertiy 
and the other does not...

Bests,
Lars

PNG image

PNG image

Normal

A1 B1
A2
B2.A1 B2.B1

Collapsing

A1 B1
A2
B2.A1 B2.B1


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]