AH Formatter / XSL Formatter
Q&A



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

テーブル

トップ
基本・一般
AH Formatter について
XSL Formatter について
操作方法
プログラミング
XSLT/XSL-FO/SVG/MathML 仕様について
XSLT/XSL-FO/MathML テクニック
索引
Q.  fo:blockmargin を指定し、その子供の fo:table にも margin を指定したのですが、 fo:table は親の fo:blockmargin の影響を受けません。なぜですか。 [No.2004032508]
A. 

例えば、次のような場合です。

<fo:block margin-left="1in">
  <fo:table margin-left="0.75in">

W3CのXSL-FO仕様の勧告には以下のようにあります。

5.3.2. Margin, Space, and Indent Properties

If the corresponding absolute "margin" property is specified on the formatting object and the formatting object generates a reference area the computed value of the margin is used to calculate the computed value of the corresponding "Y-indent" property, where Y is either "start" or "end". The formulae for "start-indent" and "end-indent" are":
start-indent = margin-corresponding + padding-corresponding + bordercorresponding-width
end-indent = margin-corresponding + padding-corresponding + bordercorresponding-width

margin-leftstart-indent として扱われます。 start-indent の値はリファレンスエリアを基点とします。 fo:table はリファレンスエリアを生成しますので、fo:table に指定された margin-leftstart-indnet として変換され、 親ブロックの margin-left(start-indnet)は影響しません。 以下のように記述すると、親ブロックの margin-left が影響します。

<fo:table margin-left="from-parent() + 0.75in">

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