Tecnologías XML / XSL-FO / Referencia / Extensiones XSL de Antenna House Formatter / Propiedades / overflow-replace
(Extracto 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
Categoría Ampliaciones de desbordamiento
Una cadena de caracteres de sustitución para el texto que desborda.
Valor: | <string> |
Valor inicial: | depende del sistema |
Se aplica a: | todos los objetos de formato de nivel de bloque |
Heredado: | yes |
Porcentajes: | N/A |
Cuando se especifica overflow="replace", el texto que desborda se sustituye repitiendo la cadena especificada. La fuente utilizada para la cadena de sustitución es una única fuente, determinada por el valor de la propiedad script o por la escritura característica de la cadena. No puede especificarse una cadena compleja.
Ejemplo 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>Resultado: