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.  fo:list-item-body の最初の子要素の fo:blockspace-before を指定しました。しかし、前の fo:list-item との間にスペースが作成されません。 [No.2005080501]
A. 

正常な動作です。XSL Formatter は、次の W3CのXSL-FO仕様の勧告に従っています。

6.8.3 fo:list-item

...

The block-progression-dimension of the content-rectangle of an area generated by the fo:list-item is just large enough so that the allocation-rectangles of all its child areas are contained in it. In particular, the space-before and space-after of the child areas have no effect on the spacing of the list item. For purposes of the block-stacking constraints the areas generated by fo:list-item are treated as if there they have a fence preceding and a fence following them.

これは、fo:list-item がつくるエリアのブロック方向の大きさは、その内容のエリアの allocation-rectangle がぴったり収まる大きさにするということです。block-area の allocation-rectangle には、space-before、space-afterの分は含まれません(4.2.3 Geometric Definitions を参照してください)。 そして list item 内の space-before、space-after は list item のスペーシ ングに影響しないと書かれています。ということはそのようなスペースは無視さ れなければならないということです。

なお、以下のように space-beforefo:block ではなく fo:list-item に指定すれば、space-before の指定は有効になります。

<fo:list-item space-after="1.0em">
    <fo:list-item-label>
        <fo:block text-align="end"> 1 </fo:block>
    </fo:list-item-label>
    <fo:list-item-body>
        <fo:block> aaa </fo:block>
    </fo:list-item-body>
</fo:list-item>

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