XML technologies / XSL-FO / Reference / Attributes in XSL-FO / number-rows-spanned

(Excerpt from "XSL-FO ― Die Referenz" by Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Recommendation section: 7.28.14

Category: 7.28 Table Properties

Description

In a <fo:table-cell> element, this specifies how many rows a cell spans. It spans only following rows, starting from the current cell. Each spanned row must then contain one fewer cell.

Values

Numeric value

A positive decimal number or a negative integer. The W3C Recommendation theoretically permits decimals, rounded to the nearest positive integer. Negative integers are also permitted and would automatically become 1 (one table row).

Default value: 1

XSL-FO version: 1.0

Allowed in:

<fo:table-cell>

This element places data in a table cell.

Support:

Conformance level

Antenna House

FOP

RenderX XEP

Altsoft XML2PDF

Compart DocBridge

Basic

Y

Y

Y

Y

Y

XSL-FO example:

<fo:root font-family="Arial" font-size="10pt" line-height="1.2em" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">
<fo:layout-master-set>
<fo:simple-page-master master-name="Inhalt-Seiten" margin="0mm 0mm 0mm
                      0mm" page-height="297mm" page-width="210mm">
<fo:region-body margin="5mm 5mm 5mm
                      5mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten">
<fo:flow flow-name="xsl-region-body">
<fo:block height="75mm" vertical-align="middle">
<fo:table>
<fo:table-column column-width="20%" background-color="#F38222" border-color="black" border-width="1pt" border-style="solid"/>
<fo:table-column column-width="30%" background-color="#4F491D" color="white" border-color="black" border-width="1pt" border-style="solid"/>
<fo:table-column column-width="20%" background-color="#F38222" border-color="black" border-width="1pt" border-style="solid"/>
<fo:table-column column-width="30%" background-color="#4F491D" color="white" border-color="black" border-width="1pt" border-style="solid"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="black 1pt
                      solid" number-rows-spanned="2" background="#F38222" text-align="center">
<fo:block reference-orientation="90">
Zeile 1+2, Spalte 1
</fo:block>
<fo:block>
number-rows-spanned="2"
</fo:block>
</fo:table-cell>
<fo:table-cell number-rows-spanned="3" color="white" border="black 1pt
                      solid" text-align="center">
<fo:block>
»Zeile 2+3+4, Spalte 2
</fo:block>
<fo:block>
number-rows-spanned="3"
</fo:block>
</fo:table-cell>
<fo:table-cell border-bottom="black 1pt
                    solid" text-align="center" number-columns-spanned="1.5">
<fo:block>
Zeile 1, Spalte 3.
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="center" number-columns-spanned="2" number-rows-spanned="2" background="#F38222">
<fo:block>
Zeile 2, Spalte
                3+4
</fo:block>
<fo:block>
number-columns-spanned="2"
</fo:block>
<fo:block>
number-rows-spanned="2"
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="center">
<fo:block>
Zeile 3, Spalte 1
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

Download the examples

In the output:

Excerpt from the W3C Recommendation:

More information online about

Introduction: "Tables">

Rendering of the property in the XSL-FO reference

back to top