How to format this footer?

Here should go questions about transforming XML with XSLT and FOP.
velsuz
Posts: 1
Joined: Mon Aug 06, 2018 7:08 pm

How to format this footer?

Post by velsuz » Mon Aug 06, 2018 7:17 pm

Hi guys, I'm very new to XSLT and I have to a question on how to format my footer.

The footer row should contain two fields and are delimited with a "|"
The first field is the row count, has a fixed width of 10 characters, left align in the field will be word ‘COUNT’ (upper-case) while the numeric count of the records in the file must be right aligned.

The footer's second field should be a timestamp of the current date and time.

The footer suppose to look like this:

COUNT 5|2018-05-12T18:17:52.498-07:00

I added the footer myself and it is only showing the a numeric value of the number count. with no word "COUNT' in front of it, and I do not know how to add a timestamp either, could someone please help me with it?

I have my xslt written like this:

<Footer xtt:separator="|">
<COUNT xtt:number="totalCount"/>
</Footer>

Please help me on how to fix it to achieve the above effect, thanks.

Costin
Posts: 604
Joined: Mon Dec 05, 2011 6:04 pm

Re: How to format this footer?

Post by Costin » Tue Aug 07, 2018 11:27 am

Hello,

It is not clear if the source files you work with are general XML documents, or if they are one of the common XML specialization (like DITA or DocBook).
It is also not clear which transformation scenario are you applying to publish your documents. Is it one of the scenarios that come predefined in oXygen?

However, if you work with DITA documents and feel more comfortable using CSS instead of XSLT, you could try using one of the DITA Map PDF based on CSS transformation scenarios as you could have your own customization CSS file that you could pass to the scenario either as a parameter or in a publishing template.
You could learn more on PDF customization using CSS in the User-Guide from our website:
https://www.oxygenxml.com/doc/versions/ ... n_css.html
There is also a section that provides some tips for working with headers or footers:
https://www.oxygenxml.com/doc/versions/ ... nd_footers

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

Post Reply