Hi Georg, I think you uncovered another uncertainty due to XSL-FO referencing CSS2. Basically it depends on which effect the “left” property has, given that in your example it has its default value of “auto” [1]. Looking at CSS2, the answer is all but straightforward [2].
However, if we make the reasonable assumption that by not specifying any value for “left” you actually meant 0, then the behaviour seems to me to be correct WRT the XSL-FO specification, even if probably unexpected. Having the absolute-position property set to “absolute”, the block-container generates areas with area-class “xsl-absolute”. According to section 4.9.1, “Geometry” [3], those areas are offset from the nearest ancestor reference-area (roughly speaking, in your example, the border of the page), by the left-position trait. Section 5.5.4, “Absolute-position Property” [4], says that the left-position trait is directly copied from the value of the “left” property, which we will assume to be zero. This actually means that the start-indent is not taken into account, since the left-position trait represents the distance of the content-rectangle from the edge of its nearest ancestor reference area [5]. However, section 5.3.4, “Overconstrained Geometry”, says that “The sum of the start-indent, end-indent, and inline-progression-dimension of the content-rectangle of an area should be equal to the inline-progression-dimension of the content-rectangle of the closest ancestor reference-area” [6]. Which means that the width of the block-container must be 77pt less than the width of the page. Since it’s absolutely positioned, it “looks like” it is end-indented by 77pt from the end of the page. If you want it to cover the whole page width, then specify inline-progression-dimension="100%" on the block-container, and as indicated in section 5.3.4 the end-indent will be adjusted accordingly (and set to -77pt). Also, to be on the safe side you better explicitly specify left="0" on the block-container, otherwise you’re in a case that’s not clearly explained by XSL-FO 1.1. Hopefully it will be cleared in the upcoming XSL-FO 2.0 specification, where all references to CSS2 will be removed, but you don’t know how... HTH, Vincent [1] http://www.w3.org/TR/xsl11/#left [2] http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width [3] http://www.w3.org/TR/xsl11/#rend-geo [4] http://www.w3.org/TR/xsl11/#refine-absolute-pos [5] http://www.w3.org/TR/xsl11/#area-common [6] http://www.w3.org/TR/xsl11/#overcons_geom Georg Datterl wrote: > Hi Andreas, > >>> Given this block >>> <fo:block-container absolute-position="absolute" start- >>> indent="77.16534pt" background-color="cyan"> >>> <fo:block line-height="1em" span="all" orphans="3" background- >>> color="magenta" widows="3"> >>> <fo:inline font-family="arial bold" font-size="18.0pt" line- >>> height="18.0pt" background-color="yellow">PROGEF® Standard >>> Polypropylene</fo:inline> >>> </fo:block> >>> </fo:block-container> >>> I get a block-container starting at 0pt, containing a block starting >>> at 77pt. Which is good. > >> Seems to be correct, at first glance, although... How wide is your >> region-start? > > 0, I'm in the header. Therefore I don't expect any side effects from outer > blocks. > >> IIC, the start-indent should be determined in relation to the page's >> start-edge (since the block-container is taken out of the normal flow). >> If it would not be an absolute-positioned block-container, then the inner >> block would be offset 2 x 77pt from the start-edge of the region- body, due >> to indent inheritance. (the block inherits the computed value of >> start-indent from the parent block-container) see also: >> http://wiki.apache.org/xmlgraphics-fop/IndentInheritance > > Indeed, but I get the offset at the end. > >>> But why are both blocks >> Small question: /both/ blocks? Where's the second? > > The block and the block-container. > >>> ending 77pts left of the right page border? It seems like start- >>> indent is telling the block-container how wide it is. >> Indirectly, it should obviously have an impact on how wide the block can >> grow. > > Yes, maybe "wide" is the wrong word. It should not have an impact on how far > to the right the block can grow. > >> Could be that you have stumbled upon a bug here, depending on what the >> precise result is. If you have a region-start that is roughly 77pt wide, >> could >> be that you get the impression that no indent is applied... > >>> Specifying end-indent is even more funny, an end-indent of 77pt makes >>> the block end 77pts inside of the container which seems to end twice >>> 77pts inside of the page... >> Same issue, I think. To be certain: can you post the complete document, >> including the layout-master-set? > > <?xml version="1.0" encoding="UTF-8"?> > <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> > <fo:layout-master-set> > <fo:simple-page-master master-name="test"> > <fo:region-body/> > </fo:simple-page-master> > </fo:layout-master-set> > <fo:page-sequence master-reference="test"> > <fo:flow flow-name="xsl-region-body"> > <fo:block-container absolute-position="absolute" > start-indent="77.16534pt" background-color="cyan"> > <fo:block line-height="1em" span="all" > orphans="3" background-color="magenta" widows="3"> > <fo:inline font-family="arial bold" > font-size="18.0pt" line-height="18.0pt" background-color="yellow">PROGEF® > Standard > Polypropylene</fo:inline> > </fo:block> > </fo:block-container> > </fo:flow> > </fo:page-sequence> > </fo:root> > > > > Mit freundlichen Grüßen > > Georg Datterl > > ------ Kontakt ------ > > Georg Datterl > > Geneon media solutions gmbh > Gutenstetter Straße 8a > 90449 Nürnberg > > HRB Nürnberg: 17193 > Geschäftsführer: Yong-Harry Steiert > > Tel.: 0911/36 78 88 - 26 > Fax: 0911/36 78 88 - 20 > > www.geneon.de > > Weitere Mitglieder der Willmy MediaGroup: > > IRS Integrated Realization Services GmbH: www.irs-nbg.de > Willmy PrintMedia GmbH: www.willmy.de > Willmy Consult & Content GmbH: www.willmycc.de > -----Ursprüngliche Nachricht----- > Von: Andreas Delmelle [mailto:andreas.delme...@telenet.be] > Gesendet: Dienstag, 20. Januar 2009 18:43 > An: fop-users@xmlgraphics.apache.org > Betreff: Re: start-indent endindents too > > On 20 Jan 2009, at 13:41, Georg Datterl wrote: > > Hi Georg > >> Given this block >> >> <fo:block-container absolute-position="absolute" start- >> indent="77.16534pt" background-color="cyan"> >> <fo:block line-height="1em" span="all" orphans="3" background- >> color="magenta" widows="3"> >> <fo:inline font-family="arial bold" font-size="18.0pt" line- >> height="18.0pt" background-color="yellow">PROGEF® Standard >> Polypropylene</fo:inline> >> </fo:block> >> </fo:block-container> >> >> I get a block-container starting at 0pt, containing a block starting >> at 77pt. Which is good. > > Seems to be correct, at first glance, although... How wide is your > region-start? IIC, the start-indent should be determined in relation to the > page's start-edge (since the block-container is taken out of the normal flow). > If it would not be an absolute-positioned block-container, then the inner > block would be offset 2 x 77pt from the start-edge of the region- body, due > to indent inheritance. (the block inherits the computed value of start-indent > from the parent block-container) see also: > http://wiki.apache.org/xmlgraphics-fop/IndentInheritance > >> But why are both blocks > > Small question: /both/ blocks? Where's the second? > >> ending 77pts left of the right page border? It seems like start- >> indent is telling the block-container how wide it is. > > Indirectly, it should obviously have an impact on how wide the block can grow. > Could be that you have stumbled upon a bug here, depending on what the > precise result is. If you have a region-start that is roughly 77pt wide, > could be that you get the impression that no indent is applied... > >> Specifying end-indent is even more funny, an end-indent of 77pt makes >> the block end 77pts inside of the container which seems to end twice >> 77pts inside of the page... > > Same issue, I think. To be certain: can you post the complete document, > including the layout-master-set? > > > > Cheers > > Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org