XML technologies / XSL-FO / Reference / Attributes in XSL-FO / caption-side
(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.7
Category: 7.28 Table Properties
Description
For a table of type <fo:table-and-caption>, this sets the position of its title, optionally specified in the child element <fo:table-caption>.
Values
before | The table title is displayed above the table. |
after | The table title is displayed below the table. |
start | The table title is displayed to the left of the table. |
end | The table title is displayed to the right of the table. |
The table title is displayed above the table. | |
The table title is displayed below the table. | |
The table title is displayed to the left of the table. | |
The table title is displayed to the right of the table. | |
Inherited: | yes |
Default value: before
XSL-FO version: 1.0
Allowed in:
This element creates a table with a caption above or below it. |
Support:
Conformance level | Antenna House | FOP | RenderX XEP | Altsoft XML2PDF | Compart DocBridge |
Complete | Y | N | Y | Y | N |
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="26mm 35mm 41mm
35mm"/>
<fo:region-after extent="20mm" region-name="fuß" display-align="center"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten">
<fo:static-content flow-name="fuß">
<fo:block text-align="center">
-
<fo:page-number/>
-
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body" text-align="center">
<fo:table-and-caption table-layout="fixed" caption-side="before">
<fo:table-caption width="70mm">
<fo:block background-color="#F38222">
caption-side="top" | caption-side="before"
</fo:block>
</fo:table-caption>
<fo:table width="90mm">
<fo:table-header font-weight="bold">
<fo:table-row>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte
1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte 2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte
3
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte
2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte 3
</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 Spalte
1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 2 Spalte 2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 2 Spalte
3
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-and-caption>
<fo:block margin="5mm"/>
<fo:table-and-caption table-layout="fixed" caption-side="after">
<fo:table-caption width="70mm">
<fo:block background-color="#F38222">
caption-side="bottom" | caption-side="after"
</fo:block>
</fo:table-caption>
<fo:table width="90mm">
<fo:table-header font-weight="bold">
<fo:table-row>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte
2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte 3
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte
1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte 2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte
3
</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 Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 2 Spalte
2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 2 Spalte 3
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-and-caption>
<fo:block margin-top="5mm"/>
<fo:table-and-caption caption-side="left">
<fo:table-caption width="70mm">
<fo:block background-color="#F38222">
caption-side="left" | caption-side="start"
</fo:block>
</fo:table-caption>
<fo:table width="90mm">
<fo:table-header font-weight="bold">
<fo:table-row>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte
1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte 2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte
3
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte
2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte 3
</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 Spalte
1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 2 Spalte 2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 2 Spalte
3
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-and-caption>
<fo:block margin-top="5mm"/>
<fo:table-and-caption caption-side="right">
<fo:table-caption width="70mm">
<fo:block background-color="#F38222">
caption-side="right" | caption-side="end"
</fo:block>
</fo:table-caption>
<fo:table width="90mm">
<fo:table-header font-weight="bold">
<fo:table-row>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte
2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Kopfzeile Spalte 3
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte
1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte 2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 1 Spalte
3
</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 Spalte 1
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 2 Spalte
2
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border="black solid
1pt">
<fo:block>
Zeile 2 Spalte 3
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-and-caption>
</fo:flow>
</fo:page-sequence>
</fo:root>In the output:
Excerpt from the W3C Recommendation:
More information online about
Rendering of the property in the CSS reference "caption-side"