Ajeet Singh
Ajeet Singh

Reputation: 1086

Footnote reference for xsl fo

I'm facing problem in xsl fo "footnote" footnote refrence not align how to align I want the footnotes to displaying on left align not indented. Coding are following:-

body text:-

"<footnoteref refid="FN0001">1</footnoteref>"any action taken by the Central
Government under the Resolution of the Government of India, Planning Commission
bearing Notification Number A-43011/02/2009-Admin.

XSLT:-

<xsl:template match="footnoteref">
<xsl:variable name="fnoteid" select="@refid"/>
<fo:footnote>
<fo:inline font-size="70%" baseline-shift="super">
<xsl:apply-templates/>
</fo:inline>
<fo:footnote-body>
<fo:list-block provisional-label-separation="2.5mm" provisional-distance-between-starts="10mm">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="right"  text-indent="0pt" margin-left="0pt" font-size="8.5" font-style="normal">
<xsl:value-of select="//footnote[@id=$fnoteid]/footnum"/>
<xsl:choose>
<xsl:when test="$fnoteid = 1 to 9000"><xsl:text>.</xsl:text></xsl:when>
</xsl:choose>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block text-align="justify"  text-indent="0pt" margin-left="0pt" font-size="8.5" font-style="normal">
<xsl:apply-templates select="//footnote[@id=$fnoteid]"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:footnote-body>
</fo:footnote>
</xsl:template>

my footnote look like

  1. Received the assent of the President on March 25, 2016 and published in the

    1. Received the assent of the President on March 25, 2016 and published

        3. Received the assent of the President on March
      

But i want to

  1. Received the assent of the President on March 25, 2016 and published in the

  2. Received the assent of the President on March 25, 2016 and published

  3. Received the assent of the President on March

Upvotes: 1

Views: 1262

Answers (1)

lfurini
lfurini

Reputation: 3788

It may seem counter-intuitive but the fo:footnote element inherits properties from its ancestor formatting objects.

So, if a footnote descends from an fo:block element (or another block-level formatting object) with start-indent="1cm", the footnote body too will be indented!

To achieve the expected result, modify your template to add start-indent="0cm" to the fo:list-block element inside the fo:footnote-body. Similarly, you will have to "reset" other properties you don't want the fo:footnote-body to inherit (end-indent, spaces, font-size, ...).

Upvotes: 1

Related Questions