XML technologies / XSL-FO / Reference / Elements in XSL-FO / fo:multi-toggle
(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.9.5
Category: 6.9 Dynamic Effects: Link and Multi Formatting Objects
Description
When used inside a <fo:multi-case> element, this element provides access to other <fo:multi-case> elements.
XSL-FO version: 1.0
Parent elements
<fo:basic-link> , <fo:bidi-override> , <fo:block> , <fo:folio-prefix> , <fo:folio-suffix> , <fo:index-page-citation-list-separator> , <fo:index-page-citation-range-separator> , <fo:index-page-number-prefix> , <fo:index-page-number-suffix> , <fo:inline> , <fo:leader> , <fo:marker> , <fo:multi-case> , <fo:multi-toggle> , <fo:title> and <fo:wrapper>
Child elements
This element creates a link in the document pointing to an internal or external reference. | |
This element allows the desired writing direction to be set if the default Unicode bidirectional algorithm cannot be applied. | |
This element creates a rectangular area that allows many kinds of elements, such as tables, lists and graphics. Attributes can be used to configure various aspects of its appearance. Blocks can be nested to any depth. Information from parent blocks is inherited unless different settings are specified for the child block (inheritance). | |
A block container can group any number of blocks. Attributes can be used to specify the container’s desired position in the document. | |
This element marks the start of a "change region", which is ended by its matching fo:change-bar-end. The change region has a change bar running along either the start or end edge of the column. The change bar’s appearance is determined by the values of the corresponding properties. | |
This element marks the end of a "change region" started by its matching fo:change-bar-begin. | |
This element provides separate rendering of individual characters. | |
This element inserts external graphics into the document. Attributes provide numerous configuration options. | |
This element positions content relative to a display block, for example to wrap text around graphics or create marginal notes. | |
This element creates a reference to a footnote. | |
This element groups the collections of cited page items generated by its fo:index-key-reference child elements. Ultimately, fo:index-page-citation-list is used to create a formatted list of page numbers and page ranges (a page citation list). | |
This element marks the start of an "indexed range" associated with an index key. The range is closed by a corresponding fo:index-range-end. | |
This element marks the end of an "indexed range" started by its matching fo:index-range-begin. | |
This element creates an inline area that applies separate formatting properties to specific portions of text in a block, for example to emphasize passages with italics. | |
This element creates a container in which shared settings can be applied to several inline areas. | |
This element allows inline graphics or other inline objects to be inserted into the document. | |
This element creates a line of repeated characters to separate two text formatting objects, for example headings and their page numbers in a table of contents. | |
This element creates an area for displaying a list or enumeration. | |
This element allows switching between different sets of properties. | |
This element allows switching between different subtrees of formatting objects. | |
When used inside a <fo:multi-case> element, this element provides access to other <fo:multi-case> elements. | |
This element displays the current page number in the document. | |
This element references the number of the page containing a specific formatting object, for example to display page numbers alongside headings in a table of contents. | |
This element references the number of the last page containing an area that (a) is returned by the referenced formatting object and (b) has an area-class compatible with the specified page citation strategy. | |
This element retrieves the area marked in <fo:marker>, for example for running headings. | |
Together with <fo:marker>, this element allows areas in tables to be repeated. | |
This element retrieves the scaling factor of the referenced fo:external-graphic. | |
This element creates a table. | |
This element creates a table with a caption above or below it. | |
Properties for a group of formatting objects can be specified in <fo:multi-properties>. |
Attributes
This attribute uniquely identifies an object so that other objects can reference it. | |
This attribute defines an index class for individual index entries (index-key) or an entire area. All index entries in that area belong to the class. When referencing index entries (fo:index-key-reference) belonging to different classes, their page numbers are listed separately even if they are consecutive. For example, "1-8" becomes "1-4,5-8" if entries on pages 1-4 belong to one class and pages 5-8 to another. This is useful when pages are grouped into sections with different numbering systems. A range such as "I-14" can thus be avoided and replaced with "I-V,1-14". | |
This attribute defines an index entry. The supplied value is used as the entry’s identifier. An index entry reference (fo:index-key-reference) can reference all entries with this identifier and add their page numbers to a page citation list (fo:index-page-citation-list). | |
This attribute creates content-related identifiers that provide alternative output devices, such as audio output, with information about the XML element’s content. | |
This attribute identifies an XML document as the source document. If the renderer cannot interpret the FO document, for example for a hypothetical speech output, the source document can also be consulted. It has no practical significance. | |
In fo:multi-toggle, this attribute specifies which fo:multi-case to switch to. No common formatter supports it. |
Support:
Conformance level | Antenna House | FOP | RenderX XEP | Altsoft XML2PDF | Compart DocBridge |
Extended | N | N | - | N | 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.kopf" margin="0mm 0mm 0mm
0mm" page-height="150mm" page-width="148mm">
<fo:region-body column-count="2" margin="10mm 15mm 10mm
25mm" background-color="white"/>
<fo:region-before region-name="kopf" extent="10mm"/>
<fo:region-after region-name="kopf" extent="10mm"/>
<fo:region-start extent="10mm"/>
<fo:region-end extent="10mm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="Inhalt-Seiten">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="Inhalt-Seiten.kopf"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten" font-size="10pt">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:multi-toggle switch-to="hallo">
<fo:multi-switch id="hallo">
<fo:multi-case starting-state="show">
<fo:block space-after="1em" span="all" color="black" page-break-after="always">
Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte, fand er sich in
seinem Bett zu einem ungeheueren Ungeziefer verwandelt. Er lag auf seinem
panzerartig harten Rücken und sah, wenn er den Kopf ein wenig hob, seinen gewölbten,
braunen, von bogenförmigen Versteifungen geteilten Bauch, auf dessen Höhe sich die
Bettdecke, zum gänzlichen Niedergleiten bereit, kaum noch erhalten konnte. Seine
vielen, im Vergleich zu seinem sonstigen Umfang kläglich dünnen Beine flimmerten ihm
hilflos vor den Augen.
</fo:block>
</fo:multi-case>
</fo:multi-switch>
<fo:multi-switch id="gutenTag">
<fo:multi-case starting-state="show">
<fo:block space-after="1em" span="all" color="red" page-break-after="always">
Als Gregor Samsa
eines Morgens aus unruhigen Träumen erwachte, fand er sich in seinem Bett zu einem
ungeheueren Ungeziefer verwandelt. Er lag auf seinem panzerartig harten Rücken und
sah, wenn er den Kopf ein wenig hob, seinen gewölbten, braunen, von bogenförmigen
Versteifungen geteilten Bauch, auf dessen Höhe sich die Bettdecke, zum gänzlichen
Niedergleiten bereit, kaum noch erhalten konnte. Seine vielen, im Vergleich zu
seinem sonstigen Umfang kläglich dünnen Beine flimmerten ihm hilflos vor den
Augen.
</fo:block>
</fo:multi-case>
<fo:multi-case starting-state="hallo" id="hallo">
<fo:block space-after="1em" color="blue" span="all" page-break-after="always">
Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte, fand er sich in
seinem Bett zu einem ungeheueren Ungeziefer verwandelt. Er lag auf seinem
panzerartig harten Rücken und sah, wenn er den Kopf ein wenig hob, seinen gewölbten,
braunen, von bogenförmigen Versteifungen geteilten Bauch, auf dessen Höhe sich die
Bettdecke, zum gänzlichen Niedergleiten bereit, kaum noch erhalten konnte. Seine
vielen, im Vergleich zu seinem sonstigen Umfang kläglich dünnen Beine flimmerten ihm
hilflos vor den Augen.
</fo:block>
</fo:multi-case>
</fo:multi-switch>
</fo:multi-toggle>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>In the output:
Page 2
Excerpt from the W3C Recommendation: