More table centring
Wednesday, 6 August 2003 12:39It seems that XSL-FO has decided to use, MSIE-style, text-align to centre tables, rather than controlling the centring by setting the margins to equal values.
This means that if you want to centre a table-with-caption but have the cell contents default (start) aligned, you need something like
<fo:table-and-caption text-align="center">
<fo:table-caption text-align="start">
<fo:block>Table caption goes here</fo:block>
</fo:table-caption>
<fo:table […]>
[… column definitions …]
<fo:table-body text-align="start">
[… table rows and cells …]
</fo:table-body>
</fo:table>
<fo:table-and-caption>
Foo.
no subject
Date: Thursday, 7 August 2003 01:39 (UTC)auf der Arbeit ist im Moment nicht so viel zu tun, da haben sie mir gesagt, ich soll mal XML + XSLT + XSL-FO lernen, weil ich das vielleicht in der Zukunft gebrauchen kann.
XML und XSLT gingen noch so einigermaßen, aber XSL-FO sieht mir ziemlich kompliziert aus. Vor allem, weil ich nur die Spezifikation habe und kein Tutorial, und die ist halt eher für Leute gedacht, die ein Programm schreiben das XSL-FO versteht, und nicht für Leute, die das einfach benutzen möchten, um Daten zu formatieren...
Obwohl, ob XSLT so einfach ist, wird sich auch noch zeigen; bisher habe ich es mir nur durchgelesen und noch nicht selber ausprobiert. Und ein paar der Beispielevon XSLT, die in XSL-FO-Doku waren, sahen ziemlich anspruchsvoll aus.
Na ja. Schau'n wir mal, wie gut ich damit klarkomme, wenn ich das wirklich brauche.