Hi
This is a template taken from a working application. The resulting text (a
table of contents) is exactly as required (and as required by Patrick) when
rendered by FOP 0.20.5. Alignment was bad when rendered by earlier versions of
FOP.
<xsl:template match="meeting" mode="toc">
<fo:block text-align-last="justify" padding="5mm">
<fo:inline>
<xsl:value-of select="location/title"/>
<fo:leader leader-pattern="dots"/>
<fo:page-number-citation ref-id="{generate-id(location/title)}"/>
</fo:inline>
</fo:block>
</xsl:template>
John Marshall
Accurate Software
80 Peach Street, Wokingham, Berkshire, RG40 1XH, UK.
Tel: +44 (0)118 977 3889
Fax: +44 (0)118 977 1260
http://www.accuratesoftware.com <http://www.accuratesoftware.com>
-----Original Message-----
From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
Sent: 17 November 2003 17:08
To: [EMAIL PROTECTED]
Subject: RE: leader issues...
> -----Original Message-----
> From: Patrick JUSSEAU [mailto:[EMAIL PROTECTED]
>
> In other word I want the right side of my text to be aligned. The
> fo:leader should expand as much as it can to fill the middle part. I
> also want the parent block to have a 10cm width.
>
As I understand, behaviour of the fo:leader is very vaguely described in the
spec, and apart from that, the FOP compliance page,
http://xml.apache.org/fop/compliance.html#fo-object-leader, indicates only
partial support for this object.
What definitely works, are fixed-length leaders and leaders aligned
according to the settings of the reference area (mostly: the surrounding
fo:block).
The latter _seems_ a good choice in combination with text-align="justify"
and text-align-last="justify", but from my experience, it can only be used
in practice to create layouts like this:
<fo:block text-align="justify" text-align-last="justify">
<fo:inline>line1</fo:inline>
<fo:leader leader-pattern="dots" leader-pattern-width="3pt"
leader-alignment="reference-area" />
</fo:block>
<fo:block text-align="justify" text-align-last="justify">
<fo:inline>line2withlongername</fo:inline>
<fo:leader leader-pattern="dots" leader-pattern-width="3pt"
leader-alignment="reference-area" />
</fo:block>
would yield
line1 .........................
line2withlongername ...........
If you add another fo:inline to the above fo:blocks, the fo:leader will
expand to fill the line and the last fo:inline will end up on a new line.
AFAIK there is currently no workaround to achieve the particular effect
you're seeking.
Maybe someone else has an idea?
Greetz,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Accurate Software
[EMAIL PROTECTED]
www.accuratesoftware.com
Europe . North America . Australasia . Africa
The information in this email is confidential and privileged and is intended
only for the use of the individual or entity listed above. If you are neither
the intended individual, or entity listed above, nor the person responsible for
the delivery of this email to the intended recipients, you are hereby notified
that any unauthorised distribution, copying or use of this email is prohibited.
If you have received this email in error, please notify the Accurate system
manager at [EMAIL PROTECTED] or on +44 (0)118 977 3889. The views expressed in
this communication may not necessarily be the views held by the Accurate Group.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]