xsl-list
[Top] [All Lists]

Re: [xsl] (FO) Baseline alignment in lists

2008-05-06 04:53:58
At 2008-05-06 14:25 +1000, Deborah Pickett wrote:
I am trying to work out whether my markup is wrong, or if the FO
processors I use don't support it, or if I have misinterpreted the spec.

<fo:list-item vertical-align="baseline">

I believe you need relative-align="baseline".

  <fo:list-item-label end-indent="label-end()">
    <fo:block>1</fo:block>
  </fo:list-item-label>
  <fo:list-item-body start-indent="body-start()">
    <fo:block>
      <fo:inline>Some text with a
        <fo:external-graphic src="url(large.png)"/>
        inline image
      </fo:inline>
    </fo:block>
  </fo:list-item-body>
</fo:list-item>

When I render this with FOP 0.94 and XEP 4.11, the baselines of the list
item label and the list item body don't line up vertically, because the
large external graphic pushes down the baseline of the body.  I expected
the baseline of the label to be pushed down an equivalent amount based on
this text in XSL 1.1 section 6.8.1:

  The placement, in the block-progression-direction, of the label with
  respect to the body is made in accordance with the "vertical-align"
  property of the fo:list-item.

I note in 7.31.22 that XSL-FO interprets vertical-align= as a shorthand for a number of properties, none of which are relative-align=.

In my work I've found relative-align= accomplishes what I need in this regard, both with lists and with table cells ... without which fonts smaller than the lines of the "other" parts will appear to be superscripted. Note the initial value of relative-align= is the before edge, which "pulls up" the smaller font.

I hope this helps.

. . . . . . . . . . . . . Ken


--
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>