XML-Technologien / XSL-FO / Referenz / Antenna House Formatter XSL Extensions / Properties / text-align-string
(Auszug aus "XSL-FO ― Die Referenz" von 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
Category Spacing and Alignment >> Text Alignment
axf:text-align-string specifies the text alignment when text-align="<string>".
Value: | |
Initial: | end |
Applies to: | |
Inherited: | yes |
Percentages: | N/A |
Values have the following meanings.
start | Same as text-align or text-align-last. |
center | Same as text-align or text-align-last. |
end | Same as text-align or text-align-last. |
inside | Same as text-align or text-align-last. |
outside | Same as text-align or text-align-last. |
left | Same as text-align or text-align-last. |
right | Same as text-align or text-align-last. |
Although the specification of <string> to fo:table-cell aligns the character position of decimal point, etc., there is no definition for the alignment of the whole character string. At a default, AH Formatter V6.3 displayed it right aligned according to the illustration of 17.5.4 Horizontal alignment in a column. AH Formatter V6.3 extends the alignment and makes it possible to align left or align center
XSL-FO sample:
<fo:root xml:lang="en" 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="document-title" value="Text alignment by text-align="<string>""/>
<axf:document-info name="author" value="Antenna House, Inc."/>
<fo:layout-master-set>
<fo:simple-page-master page-height="297mm" page-width="210mm" margin-top="10mm" margin-left="20mm" margin-right="20mm" margin-bottom="10mm" master-name="PageMaster1">
<fo:region-after extent="7mm"/>
<fo:region-body margin-top="0mm" margin-left="0mm" margin-right="0mm" margin-bottom="10mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="PageMaster1">
<fo:static-content flow-name="xsl-region-after">
<fo:block font-size="0.8em" text-align="right" color="green">
<fo:basic-link external-destination="http://www.antennahouse.com/">
Antenna House, Inc.
</fo:basic-link>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body" font-family="serif" font-size="1em" line-height="1.4" axf:hyphenate-hyphenated-word="false" hyphenate="true">
<fo:block span="all" font-family="sans-serif" font-size="2em" font-weight="bold" line-height="2" space-before="1em" space-after="1em" space-before.conditionality="retain" space-after.conditionality="retain" background-color="#EEEEEE">
<fo:block start-indent="1em" end-indent="1em">
Text alignment by text-align="<string>"
</fo:block>
</fo:block>
<fo:block span="all" space-before="1em" space-after="1em" space-after.conditionality="retain" text-indent="0em" border="1pt solid #9999FF" start-indent="0.5em" end-indent="0.5em" padding="0.5em" text-align="justify">
Specifying <string> to fo:table-cell aligns the position of specified letters such as a decimal point, however there is no regulation if a whole character string should be aligned on one side or the other. As a default setting, by following the illustration of CSS2 17.5.4 Horizontal alignment in a column, AH Formatter displays text in right-aligned. AH Formatter enables left-aligned and centered by extending this feataure.
</fo:block>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
No setting of text-align / axf:text-align-string
</fo:block>
<fo:table table-layout="fixed">
<fo:table-column column-width="auto"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
ABC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBB
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBBCCCC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000.12345
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
9990.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
text-align="'.'" No setting of axf:text-align-string
</fo:block>
<fo:table table-layout="fixed" text-align="'.'">
<fo:table-column column-width="auto"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
ABC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBB
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBBCCCC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000.12345
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
9990.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
text-align="'.'" axf:text-align-string="start"
</fo:block>
<fo:table table-layout="fixed" text-align="'.'" axf:text-align-string="start">
<fo:table-column column-width="auto"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
ABC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBB
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBBCCCC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000.12345
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
9990.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
text-align="'.'" axf:text-align-string="center"
</fo:block>
<fo:table table-layout="fixed" text-align="'.'" axf:text-align-string="center">
<fo:table-column column-width="auto"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
ABC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBB
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBBCCCC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000.12345
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
9990.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
text-align="'.'" axf:text-align-string="end"
</fo:block>
<fo:table table-layout="fixed" text-align="'.'" axf:text-align-string="end">
<fo:table-column column-width="auto"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
ABC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBB
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBBCCCC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000.12345
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
9990.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block space-before="1em" font-family="sans-serif" font-size="1.2em" font-weight="bold" text-indent="0em" line-height="2" keep-with-next.within-column="always">
text-align="'.'" axf:text-align-string="inside"
</fo:block>
<fo:table table-layout="fixed" text-align="'.'" axf:text-align-string="inside">
<fo:table-column column-width="auto"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
ABC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBB
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
0.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid">
<fo:block>
AAA.BBBCCCC
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
100000000.12345
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid">
<fo:block>
9990.0001
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>Output: