Dear XSL Editors,

I have another question regarding border- and padding-conditionality.
Please see the attached fo file, which gives a two-page document: the
question is whether the padding-before of the inner block should be
discarded or not on the second page.

The intuitive answer would be yes (at least I think this is what most
users would expect).

However, if we strictly follow the rules of the XSL-FO 1.1
Recommendation it seems that the padding should actually be retained.
Indeed it would be discarded if the before-edge of the area generated by
the inner block were a leading edge in the normal-flow-reference-area
(of the second page, let's call it R). This is explained in the last two
paragraphs of section 4.3.1, "Space-resolution Rules" of the XSL-FO 1.1
Recommendation.

This edge would be a leading edge if the inner blocks's area would begin
the normal-flow-reference-area (section 4.2.5), that is if it had
a stacking constraint with R and if none of its ancestor areas had
a non-null space-before.

However, the retained border on the outer block creates a fence before
the area generated by that block; which prevents the inner area from
having a stacking constraint with R. Thus the edge is not a leading edge
and the padding-before should be retained.

What is interesting is that if the outer block had a discarded
border-before then the padding would also be discarded, as this time
there would be a stacking constraint between the inner area and R.

Also, if the outer block were instead a block-container, then the
padding would again be discarded, because the reference-area to be
considered would be the one generated by the block-container.

One developer came up with an interesting interpretation: the rules at
the end of section 4.3.1 should be taken only to determine if border and
padding create fences preventing stacking constraints to occur (as seems
to be implied by the "for purposes of the stacking constraint
definitions" sentence). And that the notion of leading/trailing /area/
should instead be considered to determine if borders and padding should
actually be discarded or not.

While this interpretation makes sense and would match users'
expectations, I'm not sure if it is really intended by the
Recommendation. So could you please provide a clarification on this
subject?

Thanks,
Vincent Hennebert
<?xml version="1.0" standalone="no"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <fo:layout-master-set>
    <fo:simple-page-master master-name="page"
      page-height="4cm" page-width="15cm"
      margin-top="0cm" margin-bottom="0cm" margin-left="3cm" margin-right="3cm">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="page"
    font-family="serif" font-size="14pt">
    <fo:flow flow-name="xsl-region-body">
      <fo:block
        orphans="1" widows="1"
        border-before-width.length="6pt"
        border-before-width.conditionality="retain"
        border-before-style="solid"
        border-before-color="black">Some text. Some text. Some text. Some text. Some text. Some text.
        <fo:block
          orphans="1" widows="1"
          border-before-width.length="5pt"
          border-before-width.conditionality="retain"
          border-before-style="solid"
          border-before-color="olive"
          padding-before.length="8pt"
          padding-before.conditionality="discard">Some text. Some text. Some text. Some text. Some text. Some text. Some
          text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some
          text. Some text.
        </fo:block>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Reply via email to