This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xsl fo lists.
- To: <xsl-list at mulberrytech dot com>
- Subject: Re: xsl fo lists.
- From: "Nikolai Grigoriev" <grig at iitp dot ru>
- Date: Mon, 21 Feb 2000 20:59:35 +0300
- Reply-To: xsl-list at mulberrytech dot com
David Pawson wrote:
><fo:block >
> <fo:list-block >
> <xsl:for-each select="path wanted">
> <fo:list-item>
> <fo:list-item-label>
> <fo:block>•</fo:block>
> </fo:list-item-label>
> <fo:list-item-body>
> <fo:block><xsl:value-of select="."/></fo:block>
> </fo:list-item-body>
> </fo:list-item>
> </xsl:for-each>
></fo:list-block>
><fo:block>
>
>Does that make sense please?
Yes, it does - in FOP and in our FO2PDF; but not in the XSL WD.
Both processors expect you to express lists this way; you can
control bullet position by provisional-distance-between-starts
and provisional-label-separation attributes in <fo:list-block>.
However, if our processors were conformant, your list would be wrong.
The problem is that:
1) start-indent and end-indent for both fo:list-item-label and
fo:list-item-body are calculated relative to the surrounding
reference-area (i.e. page in most cases);
2) start-indent and end-indent are inheritable.
Therefore, fo:list-item-label in your list should overlap with
fo:list-item-body, and at this point, the formatter is obliged
to issue an error message. Instead, you should write:
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>•</fo:block>
</fo:list-item-label>
<fo:list-item-body end-indent="body-start()">
<fo:block><xsl:value-of select="."/></fo:block>
</fo:list-item-body>
</fo:list-item>
(This is a thing I dislike most in the whole WD. I argued against it
for a long time, but in vain. This way of building lists, already
present in WD 1999-04-21, has been reconfirmed and backed up
with examples in the recent draft.)
Conclusion. You face a dilemma:
- if you want to render something with the present-day tools -
you are on the right way;
- if you want to compose a conformant FO - you are wrong.
One more comment: <fo:list-block> is a block-level object itself.
You need not wrap it into a <fo:block>: every block-level property
can be specified directly on the <fo:list-block>, and every place
where <fo:block> can go will accept <fo:list-block> as well.
Regards,
Nikolai
RenderX
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list