Re: Expected Behaviour of Nested Break-before
Hi, Andreas L Delmelle wrote: > On Aug 3, 2007, at 12:13, Chris Bowditch wrote: > >> Vincent Hennebert wrote: >> >>> Hi, >>> I’m suddenly all confused about the supposedly expected behaviour of >>> breaks. Please have a look at the attached FO file and its PDF result. >>> We get 2 pages. The break-before on the outer block and the inner >>> block are “merged” into just one... Why? >> >> Well I can't explain it from a spec point of view. However, the >> current behaviour is what the users would expect. In my mind there is >> no business scenario where a page would contain just the top border of >> a block and nothing more. And if there was such a use case then there >> are far more straight forward ways of reaching such an affect, namely: >> >> > break-after="page"> > > Right. Another possible alternative is the slightly longer (I think, > haven't tried): > > white-space-treatment="preserve"> > > and this example, IMO, shows that the current behaviour is correct. > With default white-space- and linefeed-treatment, I would assume there > is no 'empty area' before the inner block's first area, so the inner > block is still leading on the second page. That’s right. At the time I wrote that I was playing with border conditionalities, and I made the confusion between leading area and “begins the nearest ancestor reference area” that applies when determining if a border shall be removed. In this case the inner block is actually leading on the second page since there is no sibling area preceding it. And I’ve just tested: when adding white-space-treatment="preserve" on the outer block there are two breaks like expected. So everything’s fine. Thanks, and sorry for the noise. Vincent
Re: Expected Behaviour of Nested Break-before
On Aug 3, 2007, at 12:13, Chris Bowditch wrote: Vincent Hennebert wrote: Hi, I’m suddenly all confused about the supposedly expected behaviour of breaks. Please have a look at the attached FO file and its PDF result. We get 2 pages. The break-before on the outer block and the inner block are “merged” into just one... Why? Well I can't explain it from a spec point of view. However, the current behaviour is what the users would expect. In my mind there is no business scenario where a page would contain just the top border of a block and nothing more. And if there was such a use case then there are far more straight forward ways of reaching such an affect, namely: fo:block> Right. Another possible alternative is the slightly longer (I think, haven't tried): treatment="preserve"> and this example, IMO, shows that the current behaviour is correct. With default white-space- and linefeed-treatment, I would assume there is no 'empty area' before the inner block's first area, so the inner block is still leading on the second page. Note that empty blocks by themselves, for example, also do not generate empty lines. Putting a thousand empty fo:blocks in sequence will accomplish exactly nothing. You need at least one preserved white-space character to achieve a 'displacement' effect in block- progression-direction. If the breaks are also merged in case of preserved linefeeds and or spaces, then FOP would be in error. Cheers Andreas
Re: Expected Behaviour of Nested Break-before
Vincent Hennebert wrote: Hi, I’m suddenly all confused about the supposedly expected behaviour of breaks. Please have a look at the attached FO file and its PDF result. We get 2 pages. The break-before on the outer block and the inner block are “merged” into just one... Why? Well I can't explain it from a spec point of view. However, the current behaviour is what the users would expect. In my mind there is no business scenario where a page would contain just the top border of a block and nothing more. And if there was such a use case then there are far more straight forward ways of reaching such an affect, namely: Now if there is some text content between the two breaks then both the inner and outer blocks should generate breaks, but there will be some text on page 2 so this has a business use case. Section 4.8, “Keeps and Breaks” of XSL-FO 1.1 states that “A break-before condition is satisfied if the first area generated and returned by the formatting object is leading within a context-area.” I could then expect that the outer block generates an empty area on page 2, with a red border-before, plus another area on page 3 (also with a red border due to the “retain”) containing the area generated by the inner block. I mimicked that in the break-before-alt.pdf file. I don’t think anything in the spec contradicts this interpretation. I’m not even sure whether the current behaviour is more desirable from a user-friendliness point of vue or not. I think the current behaviour is more user friendly, but thats just my opinion. In either case if the spec is unclear then common sense should prevail. I'm interested to hear what other's think. Chris
Re: Expected Behaviour of Nested Break-before
Sorry, attached the wrong FO file. Here it is. Vincent http://www.w3.org/1999/XSL/Format";> Before the break Text in the inner block.
Expected Behaviour of Nested Break-before
Hi, I’m suddenly all confused about the supposedly expected behaviour of breaks. Please have a look at the attached FO file and its PDF result. We get 2 pages. The break-before on the outer block and the inner block are “merged” into just one... Why? Section 4.8, “Keeps and Breaks” of XSL-FO 1.1 states that “A break-before condition is satisfied if the first area generated and returned by the formatting object is leading within a context-area.” I could then expect that the outer block generates an empty area on page 2, with a red border-before, plus another area on page 3 (also with a red border due to the “retain”) containing the area generated by the inner block. I mimicked that in the break-before-alt.pdf file. I don’t think anything in the spec contradicts this interpretation. I’m not even sure whether the current behaviour is more desirable from a user-friendliness point of vue or not. WDYT? Vincent http://www.w3.org/1999/XSL/Format";> Some text. break-before.pdf Description: Adobe PDF document break-before-alt.pdf Description: Adobe PDF document