AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/MathML テクニック

ブロック

トップ
基本・一般
AH Formatter について
XSL Formatter について
操作方法
プログラミング
XSLT/XSL-FO/SVG/MathML 仕様について
XSLT/XSL-FO/MathML テクニック
索引
Q.  text-align=<string>fo:table-cell に指定しました。しかし、セル内に複数のblockがあるとき、2番目以降のblockに適用されません。 [No.2004102603]
A. 

XSL Formatter V3.2 では、text-align=<string> がサポートされました。

W3Cの勧告7.15.9 "text-align"では以下のように書かれています。

<string>
Specifies a string on which content of cells in a table column will align (see the section, in the CSS2 Recommendation, on horizontal alignment in a column for details and an example). This value applies only if the formatting object is a descendant of a table cell. If set on other formatting objects, it will be treated as "start".

つまり、CSS2仕様17.5.4 Horizontal alignment in a columnの仕様を参照することと、table cell 内にのみ適用され、そのほかでは start と同じであるということになります。

そして、CSS2仕様の17.5.4 Horizontal alignment in a columnには以下のようにあります。

Aligning text in this way is only useful if the text fits on one line. The result is undefined if the cell content spans more than one line.

「セル内のテキストが1行だけのときに有用なものであって、セル内に2行以上あるときの結果は定義されない」ということです。定義されていないので、組版結果は実装依存です。XSL Formatter V3.2 では、一行目だけを<string>によってカラム内の他のセルと位置を揃え、それ以外の行では text-align="start" と同じとしています。


Copyright © 1999-2011 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.