XML technologies / XSL-FO / Reference / Elements in XSL-FO / fo:single-page-master-reference
(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: 6.4.9
Category: 6.4 Declarations and Pagination and Layout Formatting Objects
Description
Within a <fo:page-sequence-master>, a page master is used only once.
XSL-FO version: 1.0
Parent elements
This element defines the order of the page masters to use. The required master-name attribute references the page master to use. |
Attributes
This attribute references individual page masters (fo:simple-page-master) or complete page sequence masters (fo:page-sequence-master). They receive a name in a master-name attribute, and this name must be supplied in master-reference. The name must occur in at least one master-name attribute. If a page master and a page sequence master share a name, the page sequence master is referenced unless the reference is within a fo:simple-page-master element. If two page masters share a master-name, the first one defined is referenced. |
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.ivz" margin="11mm 55mm 11mm
55mm" page-height="297mm" page-width="210mm">
<fo:region-body margin="15mm 0mm 30mm
0mm"/>
<fo:region-before region-name="ivz.before" extent="15mm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="danksagung" margin="11mm 55mm 11mm
55mm" page-height="297mm" page-width="210mm">
<fo:region-body margin="15mm 0mm 30mm
0mm"/>
<fo:region-before region-name="danksagung.before" extent="15mm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="Inhalt-Seiten.master">
<fo:single-page-master-reference master-reference="Inhalt-Seiten.ivz"/>
<fo:single-page-master-reference master-reference="danksagung"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten.master">
<fo:static-content flow-name="ivz.before">
<fo:block text-align="right" margin="5mm
0mm" font-size="8pt">
Inhaltsverzeichnis
</fo:block>
</fo:static-content>
<fo:static-content flow-name="danksagung.before">
<fo:block text-align="right" margin="5mm
0mm" font-size="8pt">
Danksagung
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:table page-break-after="always" width="100%">
<fo:table-column width="90%"/>
<fo:table-column width="10%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell number-columns-spanned="2">
<fo:block text-align="center">
Inhaltsverzeichnis
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>
Titel
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right">
<fo:block>
Seite
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>
Danksagung
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="right">
<fo:page-number-citation ref-id="danksagung"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block page-break-after="always">
<fo:block space-after="1em" font-weight="bold" text-align="center" id="danksagung">
Danksagung
</fo:block>
<fo:block space-after="1em">
Wir danken allen,
vor allem Franz Kafka für den vorzüglichen Blindtext, den er verfasst hat. Es
handelt sich um das Werk "Die Verwandlung".
</fo:block>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>More information online about
Practical example: "Complex page sequence masters">
In the output:
Page 2
Excerpt from the W3C Recommendation: