AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/SVG/MathML Conformance

XSL-FO

Top
Basic, General
About AH Formatter
About XSL Formatter
Operation
Programming
XSLT/XSL-FO/SVG/MathML Conformance
XSLT/XSL-FO/MathML Technics
Index
Q.  I specified start-indent="5cm" for fo:flow, and specified start-indent="0cm" and margin-left="1cm" for fo:block in fo:float in my code as follows:
<fo:flow flow-name="xsl-region-body" start-indent="5cm" ...>
  <fo:float float="start">
    <fo:block start-indent="0cm" margin-left="1cm">
      <fo:block>XSL Formatter</fo:block>
    </fo:block>
  </fo:float>
I expected that I could get the indent of 1cm because I thought start-indent="0cm" in fo:block made the 5cm value of start-indent in fo:flow to "0cm" and only margin-left="1cm" in fo:block would join the result and the value of the indent became 1cm as a result. However, the formatted result on XSL Formatter is 6cm indent. How should I calculate it? [No.2005031801]
A. 

First of all, when margin-left and start-indent are specified at the same time, the specification of start-indent is disregarded (related matters: [No.2005021801] ), and then start-indent is calculated by the following expression under the condition described as "the formatting object does not generate a reference area" in "5.3.2 Margin, Space, and Indent Properties" in the W3C Recommendation for XSL-FO.

start-indent = inherited_value_of(start-indent) + margin-corresponding + padding-corresponding + border-corresponding-width

In your code, start-indent="5cm" specified to fo:flow corresponds to inherited_value_of(start-indent) and margin-left="1cm" specified to fo:block corresponds to margin-corresponding. There is no padding and border, so the value of the indent becomes 6cm as a result.


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