DITA 2.0 - topic2fo.xsl

Post here questions and problems related to editing and publishing DITA content.
PhilSmith
Posts: 19
Joined: Sat Oct 26, 2013 6:31 am

DITA 2.0 - topic2fo.xsl

Post by PhilSmith »

Hi, am making to move to DITA 2.0, and am working through a couple of issues.
1. In DITA-OT 1.8.5 - ../org.dita.pdf2/cfg/xsl/fo/topic2fo.xsl file. At the end of the document, there was the following code to set the TOC levels:
<!-- Remaining parameters are not passed in with the default Ant code. -->
<xsl:param name="tocMaximumLevel" select="3"/>
<xsl:param name="ditaVersion" select="number(/*[contains(@class,' map/map ')]/@ditaarch:DITAArchVersion)"/>

This worked fine for me - but is not present in the corresponding file in DITA 2.0. I copied it across, and all works as before. Is this processing now done elsewhere in DIT 2.0

2. The other issue is with my footer customization. They work in DITA 2.0, except for the footer / header is not applied on the last page of each topic. It is as though I have to add a "insertBodyLastFooter" and Header?
Would appreciate any thoughts
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA 2.0 - topic2fo.xsl

Post by Radu »

Hi Phil,

Sorry for the delay, the DITA OT 2.0 release notes are here:

http://www.dita-ot.org/2.0/readme/changes/rel2.0.html

So:
ditaVersion
This parameter seems to have been completely removed, along with its usage from the DITA OT 2.0. It is assumed that the version is 1.1 and above. If you have customizations which have copied older templates which used this parameter you can also eliminate its usage.
tocMaximumLevel
The parameter declaration seems to have been moved in the XSL:

DITA-OT2.0.1\plugins\org.dita.pdf2\cfg\fo\attrs\basic-settings.xsl

You seem to have made changes directly to the topic2fo.xsl XSLT, ideally you would have created a PDF customization folder and overwrite only the templates that you wanted to modify:

http://www.oxygenxml.com/doc/ug-oxygen/ ... ation.html

About this remark:
The other issue is with my footer customization. They work in DITA 2.0, except for the footer / header is not applied on the last page of each topic. It is as though I have to add a "insertBodyLastFooter" and Header?
I'm not sure what's going on there because I do not know what your exact customizations are.
You could probably try to compare the stylesheet:

DITA-OT2.0.1\plugins\org.dita.pdf2\xsl\fo\static-content.xsl

with the one in the DITA OT 1.8 and see the differences. Again, if you would have used the PDF customization approach, it could have made the upgrade easier.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
PhilSmith
Posts: 19
Joined: Sat Oct 26, 2013 6:31 am

Re: DITA 2.0 - topic2fo.xsl

Post by PhilSmith »

Thanks Radu,
I had made a couple of errors, but it allowed me to tidy a few things up.
Post Reply