Including the topic path and title in the PDF output

Are you missing a feature? Request it's implementation here.
B-E-N
Posts: 94

Including the topic path and title in the PDF output

Mon Apr 11, 2016 12:43 pm

In the past (using FrameMaker to create PDFs), we provided our translators with the translation project and a PDF. The PDF was our full english manual with one customization. The path and file name of each topic were included in the PDF. This looked like this:

Topic Title
BlaBla BlaBla topic description.
T:/manuals/project_a/spanish/chapter_name/topic_name.xml


When translating with Tansit, the topic path and name is also always visible. This information helped the translators to quickly jump to the right position in our PDF manual if they wanted to see the topic they were translating in context to other topics.

Is there a way to include the topic path and name in the PDFs we create with Oxygen using Apache FOP?
Radu
Posts: 5213

Re: Including the topic path and title in the PDF output

Mon Apr 11, 2016 1:43 pm

Hi,

This seems feasible with an XSLT customization.
The XSLT template which outputs the topic title is located in:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\xsl\fo\commons.xsl

and is called:

<xsl:template match="*" mode="processTopicTitle">

It outputs an fo:block and after that you can add:

Code: Select all

<fo:block>Original Topic: <xsl:value-of select="@xtrf"/></fo:block>


The "@xtrf" attribute is set on all DITA elements in the temporary files folder when processing and it refers to the original topic location.
Here's the recommended way in which an XSLT template can be overwritten from a customization:

https://www.oxygenxml.com/doc/versions/17.1/ug-editor/#topics/dita_pdf_output_customization.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
B-E-N
Posts: 94

Re: Including the topic path and title in the PDF output

Mon Apr 11, 2016 3:18 pm

That worked perfectly :)

Thank you.

Return to “Feature Request”

Who is online

Users browsing this forum: No registered users and 2 guests