XML technologies / XSL-FO / Reference / Attributes in XSL-FO / number-columns-repeated

(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.12

Category: 7.28 Table Properties

Description

On a <fo-table-column> element, this specifies how many columns a setting applies to. Normally, a <fo-table-column> element applies to one column, with its order determining which column receives the formatting. To give two or more adjacent columns the same formatting, define a single <fo-table-column> element and set number-columns-repeated to the number of columns that should share it.

Values

Numeric value

A positive number (including a decimal) or a negative integer. In theory, the W3C Recommendation permits decimal values, which would automatically be rounded to the nearest positive integer. Even negative integers are permitted; their value would automatically be set to 1 (one column).

Default value: 1

XSL-FO version: 1.0

Allowed in:

<fo:table-column>

This element specifies properties for table cells in the same column.

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:table>
<fo:table-column column-width="20%" number-columns-repeated="2" background-color="#F38222"/>
<fo:table-column column-width="30%" number-columns-repeated="2" background-color="#4F491D"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="center" border="black solid
                      1pt">
<fo:block>
Zeile 1
</fo:block>
<fo:block>
Spalte 1
</fo:block>
<fo:block>
Format 1: 20%
                breit, Orangener Hintergrund
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
                      1pt">
<fo:block>
Zeile 1
</fo:block>
<fo:block>
Spalte 2
</fo:block>
<fo:block>
Format 1: 20% breit, Orangener Hintergrund
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
                      1pt">
<fo:block>
Zeile 1
</fo:block>
<fo:block>
Spalte 3
</fo:block>
<fo:block>
Format 2: 30%
                breit, Grüner Hintergrund
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
                      1pt">
<fo:block>
Zeile 1
</fo:block>
<fo:block>
Spalte 4
</fo:block>
<fo:block>
Format 2: 30% breit, Grüner Hintergrund
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="center" border="black solid
                      1pt">
<fo:block>
Zeile 2
</fo:block>
<fo:block>
Spalte 1
</fo:block>
<fo:block>
Format 1: 20%
                breit, Orangener Hintergrund
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
                      1pt">
<fo:block>
Zeile 2
</fo:block>
<fo:block>
Spalte 2
</fo:block>
<fo:block>
Format 1: 20% breit, Orangener Hintergrund
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
                      1pt">
<fo:block>
Zeile 2
</fo:block>
<fo:block>
Spalte 3
</fo:block>
<fo:block>
Format 2: 30%
                breit, Grüner Hintergrund
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
                      1pt">
<fo:block>
Zeile 2
</fo:block>
<fo:block>
Spalte 4
</fo:block>
<fo:block>
Format 2: 30% breit, Grüner Hintergrund
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>

Download the examples

In the output:

Excerpt from the W3C Recommendation:

More information online about

Rendering of the property in the XSL-FO reference

back to top