Dividing parts of a footer with a horizontal rule

Post here questions and problems related to editing and publishing DITA content.
gwhite
Posts: 70
Joined: Fri Jul 27, 2012 1:46 am

Dividing parts of a footer with a horizontal rule

Post by gwhite »

I need to add a horizontal rule in my PDF footers that separates a legal statement from information about the company. The solution that occurs to me starts with adding a second variable for each footer "type" declared in the ..Customization/common/vars/en.xml file, as in:

<variable id="Body odd footer">Legal text</variable>
<variable id="Body odd footer2">Address text</variable>

I would create additional footer templates in the static-content.xsl file (or in custom.xsl in the Customization folder), as in:

<xsl:template name="insertBodyOddFooter">
<fo:static-content flow-name="odd-body-footer">
<fo:block xsl:use-attribute-sets="__body__odd__footer">
etc, etc, etc
........

<xsl:template name="insertBodyOddFooter2">
<fo:static-content flow-name="odd-body-footer">
<fo:block xsl:use-attribute-sets="__body__odd__footer">
etc, etc, etc

But even with this much, assuming it might work, I can't think how to add the horizontal rule between the two parts. (I know a horizontal rule in html can be inserted with the <hr> statement. Maybe it applies here as well.)

Am I on the right track or overthinking the problem?

Gary
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Dividing parts of a footer with a horizontal rule

Post by sorin_ristache »

Hello,

I think adding one or maybe two new variables like the existing ones called 'Body odd footer' and 'Body even footer', which you already found in the common/vars/en.xml file, should work. You should insert the content of a variable in the footer of the document as the content of the 'Body odd footer' variable is inserted, by calling the "insertVariable" template.

The horizontal line can be created with a fo:leader element that precedes the content of your additional custom variable.


Regards,
Sorin
Post Reply