|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: FO: center a table
At 2005-12-27 12:05 +0100, Florent Georges wrote:
Kaila Kaarle wrote: Yes, you are right. The way to centre a table is to use table-and-caption and use the "centre contents in inline-progression direction" directive which happens to be named "text-align=" (don't be distracted by the name of the property, that name applies even when aligning graphic content inside of a content window). There is an explicit paragraph in 6.7.2 that states the presence of this inheritable attribute are "placed relative to the context-rectangle...as specified by the text-align trait". That gives credence to the interpretation of "text-align" to be "centre contents in the inline-progression direction". So, in the absence of table-and-caption, the table is not centred, but when present, the table-and-caption centres the table. I believe the XSL-FO 1.0 specification is quite explicit on this. The instance below works just as expected in Antenna House and Ibex, though I do not get the expected results from XEP. The first test doesn't use table-and-caption, while the other two do, the first with an explicit specification of text-align= and the second with an inherited specification of text-align=. Thus, the second and third tables should be centred. I hope this helps. . . . . . . . . . . . . . . . Ken <?xml version="1.0" encoding="iso-8859-1"?><!--georges.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format"
font-family="Times" font-size="20pt"> <layout-master-set>
<simple-page-master master-name="frame"
page-height="297mm" page-width="210mm"
margin-top="15mm" margin-bottom="15mm"
margin-left="15mm" margin-right="15mm">
<region-body region-name="frame-body"/>
</simple-page-master>
</layout-master-set> <page-sequence master-reference="frame">
<flow flow-name="frame-body" xmlns="http://www.w3.org/1999/XSL/Format">
<block text-align="center">
<block>Test 1</block>
<table width="5cm" border="solid 1pt">
<table-body>
<table-cell>
<block>Hello</block>
</table-cell>
</table-body>
</table>
</block>
<block>Test 2</block>
<table-and-caption text-align="center">
<table width="5cm" border="solid 1pt" text-align="start">
<table-body>
<table-cell>
<block>Hello</block>
</table-cell>
</table-body>
</table>
</table-and-caption>
<block text-align="center">
<block>Test 3</block>
<table-and-caption>
<table width="5cm" border="solid 1pt" text-align="start">
<table-body>
<table-cell>
<block>Hello</block>
</table-cell>
</table-body>
</table>
</table-and-caption>
</block>
</flow>
</page-sequence>
</root>
|
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








