conref dita file is published to html and indexed

Post here questions and problems related to editing and publishing DITA content.
rharris
Posts: 1
Joined: Thu Dec 08, 2016 3:53 am

conref dita file is published to html and indexed

Post by rharris »

We are using 18.0.
We publish to HTML as a web-responsive build.

Here's the scenario:

We make use of single-source content references. There is a dita file that has several topics in it. The topics have IDs and other dita files reuse the topics using a <ph conref=""> tag. This is an standard implementation as per your documentation.

Here's the problem:
When publishing to HTML, the dita file (for example, conref.dita) that contains the topic to be reused is also transformed to HTML (for example, conref.html) even though it is not in any ditamaps AND it is indexed. This means that when someone does a search on our website, this file shows up in the search results. This happens when the parameter, onlytopic.in.map is set to either false (default) or true. No difference in the behavior.

This is bad. Is there a way one of the following can happen:
1. The conref.dita file not be transformed to html?
2. The conref.dita file not be indexed so that it doesn't show up in a search? We are on 18.0.

If we upgrade to 18.1, will using the webhelp.search.custom.excludes.file parameter fix this problem? We have 5 different single-source files to exclude. But then again, the file will still be on the site and potentially found.

Is there a good way to solve this problem that I just haven't found?

Thanks, Ruth
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: conref dita file is published to html and indexed

Post by Radu »

Hi Ruth,

Please see some answers below:
1. The conref.dita file not be transformed to html?
All topics should be referenced in the DITA Map, for topics like "conref.dita" they should be referenced using the 'processing-role='resource-only'' attribute but if the conref.dita has a link to other topics it may still appear in the output folder as an HTML file.
Unfortunately this is a DITA OT publishing bug:

https://github.com/dita-ot/dita-ot/issues/1734

You can also customize the DITA OT build process and remove the HTML from the output folder after publishing:

https://www.oxygenxml.com/doc/versions/ ... -file.html

but it will still get indexed because the indexing is done earlier.
2. The conref.dita file not be indexed so that it doesn't show up in a search? We are on 18.0.
We added support for this in Oxygen 18.1. Basically on the topicref which points to the "conref.dita" with the 'processing-role='resource-only'' attribute you can also set the 'search='no'' attribute and it should no longer be indexed.

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