XML technologies / XSL-FO / Reference / Antenna House Formatter XSL Extensions / Properties / diagonal-border-width
(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
Category Borders >> Diagonal Border
The axf:diagonal-border-width specifies the width of the diagonal border.
Value: | <border-width> |
Initial value: | medium |
Applies to: | all elements which can have borders |
Inherited: | yes |
Percentages: | N/A |
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="Drawing a diagonal border"/>
<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">
Drawing a diagonal border
</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">
A diagonal border can be drawn in a region such as a table cell where you can specify a border. A diagonal border by axf:diagonal-border-* is a line between the vertexes on the sides of before-start and after-end of the region, and that (reverse diagonal border) of axf:reverse-diagonal-border-* is a line between vertexes on the sides of before-start and after-end of the region.
</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">
How to use diagonal border in fo:table
</fo:block>
<fo:block text-align="justify">
An example of specifying axf:diagonal-border-color="black", axf:diagonal-border-style="solid", and axf:diagonal-border-width="1pt" in a cell of 1st raw of 1st column in the table.
</fo:block>
<fo:table-and-caption space-after="1.5em">
<fo:table table-layout="fixed" space-before="10pt" space-after="10pt" border="1.5pt solid black" text-align="left">
<fo:table-column column-number="1" column-width="40%"/>
<fo:table-column column-number="2" column-width="20%" number-columns-repeated="3"/>
<fo:table-header>
<fo:table-row height="30pt" background-color="#EEEEEE" text-align="center" display-align="center">
<fo:table-cell border="1pt solid black" axf:diagonal-border-color="black" axf:diagonal-border-style="solid" axf:diagonal-border-width="1pt" padding="1.5pt" display-align="before">
<fo:block text-align="right" end-indent="4em">
Sales month
</fo:block>
<fo:block>
</fo:block>
<fo:block text-align="left" start-indent="4em">
Group
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
January
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
February
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
March
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row height="20pt" text-align="center" display-align="center">
<fo:table-cell border="1pt solid black">
<fo:block text-align="center">
Group A
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
58.4%
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
68.2%
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
92.0%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="20pt" text-align="center" display-align="center">
<fo:table-cell border="1pt solid black">
<fo:block text-align="center">
Group B
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
67.0%
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
70.7%
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
88.2%
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="20pt" text-align="center" display-align="center">
<fo:table-cell border="1pt solid black">
<fo:block text-align="center">
Group C
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
87.0%
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
72.3%
</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black">
<fo:block>
95.2%
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-and-caption>
<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">
Reverse diagonal border
</fo:block>
<fo:block text-align="justify">
An example of specifying axf:reverse-diagonal-border-style="solid", axf:reverse-diagonal-border-width="4pt", and axf:reverse-diagonal-border-color="#2222FF" in block-container and drawing a reverse diagonal border.
</fo:block>
<fo:block-container start-indent="50pt" space-before="0.5em" end-indent="50pt" border="solid #7777FF 4pt" padding="4pt" axf:reverse-diagonal-border-style="solid" axf:reverse-diagonal-border-width="4pt" axf:reverse-diagonal-border-color="#2222FF">
<fo:block start-indent="0pt" end-indent="0pt" text-align="justify">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam bibendum tincidunt pharetra. Aenean ultricies molestie ante, sit amet ultricies nunc mollis id. Integer ut porttitor felis, vel tincidunt velit. Duis volutpat, quam quis aliquet tristique, nulla dui malesuada velit, et consectetur tellus ipsum et arcu. Ut tincidunt lorem erat, at elementum nibh varius consectetur. Sed viverra metus quis nibh pulvinar, at dignissim nibh adipiscing. Duis sit amet ipsum non elit tincidunt sagittis ac non tortor. Mauris commodo, elit a imperdiet interdum, nulla velit viverra elit, at scelerisque urna est eget lacus. Integer eu lobortis neque. Donec malesuada sed arcu vitae fringilla.
</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>Output: