displaying element labels in PDF

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Boreas
Posts: 86
Joined: Wed Feb 09, 2011 10:43 pm

displaying element labels in PDF

Post by Boreas »

Hello,
Is there a way to display the labels of the elements in a PDF for example to display the word Result when the result element is used? The out of the box dita pdf transformation scenario does not do it.
Also, will these element labels be translated if the language parameter is used for another language?


Kind regards
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: displaying element labels in PDF

Post by Radu »

Hi,

Oxygen uses the DITA Open Toolkit to publish DITA content to various output sources.

If you edit the DITA to PDF transformation scenario, in the Parameters tab there is a parameter called args.gen.task.lbl which should be set to YES.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Boreas
Posts: 86
Joined: Wed Feb 09, 2011 10:43 pm

Re: displaying element labels in PDF

Post by Boreas »

heum.....
In the PDF transformation senario the element labels do not display even if I set the parameter to yes. However the TOC label is displayed in French as specified in the laguage attribute of the file.
In the WebHelp transformation scenario the element labels are displayed but not in the language specified in the language attribute.

So I am trying to solve 2 problems at a time.
Display element labels in both PDF and WebHelp.
Display element labels in the appropriate language according to language attribute.

8-)
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: displaying element labels in PDF

Post by Radu »

Hi,

What version of Oxygen are you using? Are you using a custom DITA Open Toolkit installation or the bundled one?
Display element labels in both PDF and WebHelp.
Setting the args.gen.task.lbl parameter for the PDF transformation scenario works for me. For example for a task's result and procedures I get:
Image
Display element labels in the appropriate language according to language attribute.
So for the WebHelp plugin added by Oxygen in the bundled DITA OT distribution:

In Oxygen 12.2 or older there are no translations available for the static texts associated with the search process like Search, Content, Keywords. Oxygen 13 which will be released in September will allow you to set a language parameter to the WebHelp scenarios which will control the language for all static texts.

Until then I will try to make a list with places where different static texts are to be found:

1) The "Search" and "Content" texts are found in the method hideDiv() from the Javascript file:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/webhelp/resources/assets/webhelp.js

2) The "Keywords" and the "Search" button static text are in the:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/webhelp/xsl/map2webhelptoc.xsl

3) The Up/Previous/Next navigation text can be found here:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/webhelp/xsl/dita2webhelpImpl.xsl

4) The "Your search returned no results for" and "Results for" static texts can be found here:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/webhelp/resources/search/nwSearchFnt.js

Other static texts which appear in the WebHelp XHTML output like Results when the args.gen.task.lbl parameter is enabled are controlled by the xml:lang attribute which can be set on each topic.
If you do not want to specify the language in each topic you can edit the XSLT:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/xsl/common/dita-utilities.xsl and there is a parameter:

Code: Select all

<xsl:param name="DEFAULTLANG">en-us</xsl:param>
which can be defaulted to French.


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
daveg
Posts: 11
Joined: Fri Oct 15, 2010 11:48 am

Re: displaying element labels in PDF

Post by daveg »

I don't seem to have the args.gen.task.lbl parameter when editing a pdf transformation. (It is listed in the Webhelp parameter list though)

Any idea why that might be?
PDF transform parameters:
Image
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: displaying element labels in PDF

Post by Radu »

Hi David,

What exact version of Oxygen are you using? Maybe in an older version the parameter was not in the list of default parameters by mistake.
But you can add it to the list yourself args.gen.task.lbl with value YES and see if this works.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
daveg
Posts: 11
Joined: Fri Oct 15, 2010 11:48 am

Re: displaying element labels in PDF

Post by daveg »

I'm using version 12.0.
I've tried to add it myself but that didn't seem to work either.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: displaying element labels in PDF

Post by Radu »

Hi David,

The parameter was added to the list of default parameters in Oxygen 12.2 (which contains DITA Open Toolkit 1.5.2) but I tried adding it manually using an Oxygen 12.0 installation (contains DITA OT 1.5.1) and it worked for me.

For example if you have a DITA task with steps and you publish to PDF using args.gen.task.lbl set to YES then before the steps in the PDF output you should have a large label displayed called PROCEDURE.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
daveg
Posts: 11
Joined: Fri Oct 15, 2010 11:48 am

Re: displaying element labels in PDF

Post by daveg »

Thanks Radu,

That's working now, having YES in all uppercase letter seemed to do the trick.
daveg
Posts: 11
Joined: Fri Oct 15, 2010 11:48 am

Re: displaying element labels in PDF

Post by daveg »

Are the parameters expected to be case sensitive?
Is there something I could have changes to be causing this?

To display element labels in Web Help output I had to use the following work-around because I could not edit the args.gen.task.lbl parameter:

I added a new parameter to the Parameters tab the Oxygen Transformation scenario:args.gen.task.lbl2 and set it to YES.

Then I added the following parameter to the build.xml file,
<param name="GENERATE-TASK-LABELS" expression="${args.gen.task.lbl2}" if="args.gen.task.lbl">
</param>

Now task elements display in both PDF and Web Help outputs.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: displaying element labels in PDF

Post by Radu »

Hi David,

You are right, the parameter's values can be chosen from a combo box and indeed the combo box in Oxygen 12.0 has the wrong values. Sorry about this.

Maybe you could try upgrading to 12.2, the upgrade is free and I think 12.2 fixed this small problem.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply