Page 1 of 1

WebHelp Responsive: Shared topics not linked correctly

Posted: Mon Dec 19, 2016 4:12 pm
by Anonymous1
Hello,

there is a bug in the WebHelp Responsive output in Oxygen Editor 18.1 (build 2016112217).

I have a ditamap that contains several sub-ditamaps. And I have a topic that must appear at two different locations in the operation manual. So the same topic is linked in sub_ditamap_a and sub_ditamap_b.

When I now click on the topic title of the shared topic in the table of content of ditamap_b, the topic is always opened in ditamap_a. The URL displays the link to ditamap_a and the TOC of ditamap_a is opened.

I have also activated the previous/next navigation buttons. There is also a bug. For shared topics, several previous/next arrows are displayed. One for each location of this topic at any position in the ditamap.

Re: WebHelp Responsive: Shared topics not linked correctly

Posted: Fri Mar 24, 2017 3:53 pm
by Anonymous1
Is there a fix in sight for this? Some topics in our WebHelp look very weird because of it. It makes navigation past those shared topics very difficult.

Image

Re: WebHelp Responsive: Shared topics not linked correctly

Posted: Fri Mar 24, 2017 5:32 pm
by radu_pisoi
Hi,

Sorry for the late reply. It was a problem in our internal management system for users feedback and the this message was somehow omitted.

For the case when you want to refer the same topic in the DITA map for multiple times, it is recommended to use the copy-to attribute like in the following sample:

Code: Select all

<topicref href="tasks/gardenPreparation.dita" copy-to="tasks/gardenPreparation-copy.dita"/>
https://www.oxygenxml.com/dita/1.3/spec ... butes.html

In case when you use the copy-to attribute, a separate HTML file will be generated into the output folder, so the navigational links(breadcrumb, side TOC, menu) from WebHelp output could be computed correctly.

Re: WebHelp Responsive: Shared topics not linked correctly

Posted: Fri Mar 24, 2017 5:47 pm
by Anonymous1
Great, I wasn't aware of that attribute. Thanks, it works.

Re: WebHelp Responsive: Shared topics not linked correctly

Posted: Fri May 01, 2020 10:33 pm
by awrlv
We'd like to apply the copy-to attribute to all the multiple instances of topics in a publication map (to fix the navigation arrows in the WebHelp Responsive output as discussed in prev. posts).

Is there an easy way to locate these topics? If there is just one root map, an XPath query works fine, but I am not how to search through any submaps as well. Any light you could shed would be appreciated. Thanks.

Re: WebHelp Responsive: Shared topics not linked correctly

Posted: Mon May 04, 2020 12:28 pm
by Costin
Hi awrlv,

You could open the main DITA Map - the parent Map that contains all other subamaps, then set the scope for your Xpath to the current DITA Map hierarchy.
The scope can be set either from the Xpath toolbar - there's a small widget that looks like a file with down pointing arrow at the left side of the XPath toolbar, or from the XPath/XQuery Build dedicated view.

The builder view is available from menu Window > Show View > XPath/XQuery Builder.
Once in the XPath Builder view, you can change the scope from Current File to Current DITA map hierarchy.

However, just as a side note, to avoid multiple instances of the same topic references, there is the parameter that you should look for in the Parameters tab of the WebHelp transformation scenario, called "force-unique" (more details on the DITA OT parameters page on their website), which is specially designed for that purpose. You should just make sure it is set on true ("true" is the default parameter value as well).

Regards,
Costin

Re: WebHelp Responsive: Shared topics not linked correctly

Posted: Mon May 04, 2020 2:57 pm
by awrlv
Thank you, Costin, for your quick reply. I have actually already tried setting the scope to the current DITA Map hierarchy. Unfortunately, something like this query will only return the matching topics in the root map.

let $x := //topicref[@href = following::topicref/@href or @href = preceding::topicref/@href]
return $x

It won't, for example, return a topicref in the main map that is also used in a submap. (Probably because it's not formulated correctly?)

I guess I was hoping that you would know of a query that would work. Or perhaps there is a way to configure the DITA Maps Metric Report to return the list of non-unique topicrefs? (As it already provides a count of the unique topics.)

Thanks again.

Re: WebHelp Responsive: Shared topics not linked correctly

Posted: Tue May 05, 2020 1:29 pm
by Costin
Hi,

Indeed, the XPath is applied for each topic in the root map.

However, in this case, you could run the XPath on the expanded DITA Map that contains the submaps and their topicrefs. Such a DITA Map is available in the temporary folder created at transformation runtime.
In order to keep that map available, you should edit your transformation scenario and, in the Parameters tab, set "clean.temp" to "no".
The expanded DITA Map will become available in the folder that is configured as temp in your scenario (go to the Output tab and see the path for "Temporary files directory").

Regards,
Costin

Re: WebHelp Responsive: Shared topics not linked correctly

Posted: Tue May 05, 2020 1:51 pm
by awrlv
Thank you! Very helpful.