Appending non-DITA (XML) references to a DITA map

Post here questions and problems related to editing and publishing DITA content.
rminaker
Posts: 27
Joined: Thu Dec 19, 2013 4:34 pm

Appending non-DITA (XML) references to a DITA map

Post by rminaker »

Hi,

I've created a DITA map and would like to add links to files that aren't .dita to the map itself. For the project I'm working on now, I'd like to be able to add a topicrefs that are PDFs and Excel files, and generate a Webhelp output where I can open these files as if they were standard links.

Within Oxygen (16), this seems to work fine. I can add both files types as topicrefs in the map the same way that I would add .dita files. The difference being the Format displays as PDF / Excel and I need to specify a Navigation titles, otherwise the navigation title is the HREF path.

When I generate a Webhelp output, everything seems to work fine, except when I click the topicref the files don't open. For the Excel file, nothing happens, for the PDF, I get a pop-up within Internet Explorer asking if I want to open or save the file. When I click open, nothing happens.

Is there any way to make this work -- setting that I'm missing or a tweak that I can make to the template?

Thanks!

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

Re: Appending non-DITA (XML) references to a DITA map

Post by sorin_ristache »

Hi,

It is not enough to add the files as topicrefs in the DITA map. Additionally you have to add both the PDF and Excel files to the map as resources:

Code: Select all

  <topicref href="PDF-file.pdf" format="pdf" processing-role="resource-only"/>
<topicref href="XLS-file.xslx" format="xslx" processing-role="resource-only"/>
and also you have to add the Excel file type to the list of supported resource types. The PDF file type is one of the built-in resource types, so only the Excel file type needs to be added in your case.

The normal way of adding a new file type as resource is to create a DITA-OT plugin that specifies that. There is a shortcut which I recommend in your case (if you don't need other new functionality added to the DITA transformation):
  • delete the file OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/lib/dost-configuration.jar
  • edit the file OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/lib/org.dita.dost.platform/plugin.properties and add .xslx on the line supported_resource_extensions

Regards,
Sorin
Post Reply