We are using this XSL-FO to generate entries in the Table of Contents page:
<fo:block text-align-last="justify">
<xsl:value-of select="@title" />
<fo:leader leader-pattern="dots" />
<fo:page-number-citation ref-id="{@id}" />
</fo:block>
When pages have very long titles, the page number is bumped onto a new line. If the page title is long enough to bump the page number onto a new line but not long enough to go onto a new line itself, the page number will be left aligned when it should be right aligned.
As far as I can tell, the XML is correct and this is an issue with XSL-FO itself. Is there a way to get all of the page numbers right aligned without redesigning anything else about the layout?
Update:
Thanks for the response Tony Graham, unfortunately it doesn't seem for me for some reason. On lines that should have a single continuous leader I would end up with two sets of leader dots separated by a small gap that I could not get rid of. But it did inspire this solution that works well enough for me:
<fo:block text-align-last="justify">
<xsl:value-of select="@title" />
<fo:leader leader-pattern="dots" />
<fo:page-number-citation keep-with-previous="always" ref-id="{@id}" />
</fo:block>