|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: vertical centering of a block in XSL-FO.
Fred Romelfanger <fred@xxxxxxxxx> wrote:
>I have two blocks that are beside each other in a table. One block is
>larger than the other, and I want the smaller one centered vertically.
For vertical centering in table-cell, display-align="center" is the
answer. For example:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="all-pages">
<fo:region-body margin="1in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-name="all-pages">
<fo:flow flow-name="xsl-region-body">
<fo:table>
<fo:table-column column-width="1in"/>
<fo:table-column column-width="1in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell display-align="center">
<fo:block>This block is small.</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center">
<fo:block>
This block is larger than the other.
The smaller one is centered vertically.
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
>I am currently using Apache's implementation of XSL-FO.
Unfortunately, in this moment Apache's FOP does not support
display-align property. (I tested FOP 0.15)
Our implementation, Antenna House XSL Formatter supports this.
Please try it.
http://www.antennahouse.com/xslformatter.html
Regards,
MURAKAMI Shinyu
XSL-Dev, Antenna House, Inc.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








