XML technologies / DocBook / Block elements / Tables / Spanning rows vertically

(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)

To span rows, the element entry provides the attribute morerows. This specifies the number of rows over which the cell should extend.

Example: Spanning rows

<table>
 <title>morerows-Tabelle</title>
 <tgroup cols="3">
  <colspec colnum="1" colname="c1" align="left"/>
  <colspec colnum="2" colname="c2" align="left"/>
  <colspec colname="c3" align="left"/>
  <tbody>
    <row>
     <entry morerows="1" valign="middle">Eins</entry>
      <entry>Zwei</entry>
      <entry>Drei</entry>
    </row>
    <row>
      <entry>Zwei</entry>
      <entry colname="c3">Drei</entry>
    </row>
  </tbody>
 </tgroup>
</table>

Result:

 

Table: morerows table

Eins

Zwei

Drei

Zwei

Drei

In the example above, the first and second rows are combined in column one. Subsequent columns must therefore use the attribute colname to obtain the correct cell position.

Note that the subsequent row elements must contain correspondingly fewer entry elements.

  

back to top