Technologies XML / XSL-FO / Référence / Extensions XSL d’Antenna House Formatter / Propriétés / overflow-replace
(Extrait de « XSL-FO ― Die Referenz » de 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
Catégorie Extensions de débordement
Une chaîne de caractères de remplacement pour le texte qui déborde.
Valeur : | <string> |
Valeur initiale : | dépend du système |
S’applique à : | tous les objets de mise en forme de niveau bloc |
Hérité : | yes |
Pourcentages : | N/A |
Lorsque overflow="replace" est spécifié, le texte qui déborde est remplacé par la répétition de la chaîne spécifiée. La police utilisée pour la chaîne de remplacement est une police unique, déterminée par la valeur de la propriété script ou par l’écriture caractéristique de la chaîne. Une chaîne complexe ne peut pas être spécifiée.
Exemple XSL-FO :
<fo:root font-family="Arial Unicode MS" font-size="12pt" 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">
<axf:document-info name="author" value="Alex Critchfield, Antenna House"/>
<axf:document-info name="keywords" value="extensions, value, overflow"/>
<axf:document-info name="subject" value="overflow extended values"/>
<axf:document-info name="title" value="overflow extended values example"/>
<fo:layout-master-set>
<fo:simple-page-master page-width="8.5in" page-height="11in" master-name="main">
<fo:region-body region-name="body" margin-top="1in" margin-bottom="1in" margin-left=".75in" margin-right=".75in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="main">
<fo:flow flow-name="body">
<fo:block>
The
<fo:wrapper font-weight="bold">
overflow
</fo:wrapper>
property is used determine the behavior of Formatter when the contents of an area format to a size greater than the area's defined boundaries. Antenna House has extended the value of this property to the following values.
<fo:block/>
overflow="replace" allows for replacement of overflowing contents, similar to how spreadsheets replace number too large to display in cells with "*****". The string to replace the overflow with is defined as the value of the extension element axf:overflow-replace.
<fo:block/>
overflow="condense" allows the text to be condensed according to the value of the axf:overflow-condense extension property.
<fo:block/>
These extended values only apply to block-container and inline-container elements.
</fo:block>
<fo:block space-before="10mm" padding="5pt" text-align-last="center" border="2pt solid black">
overflow="none" (default)
<fo:block/>
<fo:inline-container color="blue" font-size="30pt" padding="5pt" text-align-last="center" display-align="center" width="4in" height="1in" border="2pt solid salmon">
<fo:block keep-together="always">
rubber baby buggy bumpers
</fo:block>
</fo:inline-container>
</fo:block>
<fo:block space-before="10mm" padding="5pt" text-align-last="center" border="2pt solid black">
overflow="replace" axf:overflow-replace="#"
<fo:block/>
<fo:inline-container overflow="replace" axf:overflow-replace="#" color="blue" font-size="30pt" padding="5pt" text-align-last="center" display-align="center" width="4in" height="1in" border="2pt solid salmon">
<fo:block keep-together="always">
rubber baby buggy bumpers
</fo:block>
</fo:inline-container>
</fo:block>
<fo:block space-before="10mm" padding="5pt" text-align-last="center" border="2pt solid black">
overflow="condense" axf:overflow-condense="font-size"
<fo:block/>
<fo:inline-container overflow="condense" axf:overflow-condense="font-size" color="blue" font-size="30pt" padding="5pt" text-align-last="center" display-align="center" width="4in" height="1in" border="2pt solid salmon">
<fo:block keep-together="always">
rubber baby buggy bumpers
</fo:block>
</fo:inline-container>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>Résultat :