Re: [xsl] keep properties

Subject: Re: [xsl] keep properties
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Tue, 05 Feb 2002 10:35:16 +0100
"Carmelo Montanez" <carmelo@xxxxxxxx> wrote:
> Thanks, Joerg et all for the nice example, however looking at the specs, I
> am wondering now how we may interpret the "next".
> Shall we interpret that as the very next FO (even if its a child)
> or the next sibling.  Consider this scenario

I interpret the spec that it deals with areas. A keep-with-previous
keeps the area together with the previous area in the same parent,
with respect to some order. Since most FOs generate areas, often
"FO" and "area" are synonymous, but there are exceptions.
> 
> 1    <fo:inline keep-with-next= "always">
> 2      <fo:external-graphic src="somegraphic.gif"></fo:external-graphic>
> 3    </foinline>
> 4   <fo:inline>and some stuff here.</fo:inline>
> 
> The way I read it, keep-with-next refers to the external-graphic on the
> line labeled "2" and NOT the inline on the line labeled "4".  I take
> it "keep-with-previous" follows a similar logic.  Anyone else
> reads it differently?

The fo:inline at 1 creates an area which has the area created by the
graphic as only child, so they are identical for all practical purposes
The fo:inline at 4 creates an area which determined by the area of
the text "and some stuff here", which turn is broken down into the areas
of the words and the white spaces between them. I think the areas of the
words are broken down into the areas for the glyphs representing the
letters, which are always kept together unless there is hyphenation.
It's the areas of the fo:inlines have to be kept together. This has
probably have to be interpreted as "there is no break between the areas"
which comes down to "there is no break between the last descendant area
of the first and the first descendent area of the second", in the example
above this means the glyph "a" for the first letter of "and", and in turn
the whole word, is glued to the graphic. Note that i'm not a FO expert by
any stretch of measure, it may turn out all different. The relevant part
of the spec, however, is slice4.html#keepbreak with the header "area model",
so it's certainly a good idea to think of a tree of areas rather than FOs
when visualizing the final layout.

Regards
J.Pietschmann

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread