AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/SVG/MathML 仕様について

XSL-FO

トップ
基本・一般
AH Formatter について
XSL Formatter について
操作方法
プログラミング
XSLT/XSL-FO/SVG/MathML 仕様について
XSLT/XSL-FO/MathML テクニック
索引
Q.  次のように、margin-topmargin-leftmargin-rightspace-beforestart-indentend-indent を指定した場合、どのように動作しますか。
<fo:block-container margin-top="xxx" margin-left="yyy" margin-right="zzz" space-before="aaa" start-indent="bbb" end-indent="ccc">
[No.2005021801]
A. 

XSL Formatterは、relative (before/after/start/end) property である start/end-indentspace-before/after の指定を無視して、absolute (top/bottom/left/right) property である margin-left/right/top/bottom の指定を有効にします。これは、W3Cの勧告どおりの動作です。詳細については、以下を参照してください。

5.3 Computing the Values of Corresponding Properties
5.3.1 Border and Padding Properties

...

If both an absolute and a corresponding relative property are  explicitly specified, then the above rule gives precedence to the absolute property, and the specified value of the corresponding relative property is ignored in determining the computed value of the corresponding properties.

5.3.2 Margin, Space, and Indent Properties

...

If the corresponding absolute "margin" property is specified

...

the computed value of the margin is used to calculate the computed value of the corresponding "Y-indent" property

ただし、次のようなコードの場合、relative property である start/end-indent が適用されます。

<fo:block-container margin="-2.5in" start-indent="0in" end-indent="0in">

これは、relative property (start/end-indent) が指定されていて shorthand の展開の結果としての margin だけが指定されているときには、margin は start/end-indent などから計算される仕様になっているからです。詳細については、以下を参照してください。

5.3.2 Margin, Space, and Indent Properties

...

If the corresponding absolute margin property is not explicitly specified, or if the corresponding relative property is specified on the formatting object and the absolute property only specified by the expansion of a shorthand, the corresponding absolute margin property is calculated according to the following formulae:


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