Using the topicref copy-to attribute with WebHelp output

Questions about XML that are not covered by the other forums should go here.
bmerenbloom
Posts: 2
Joined: Tue Apr 09, 2019 6:38 pm

Using the topicref copy-to attribute with WebHelp output

Post by bmerenbloom »

My .ditamap has sub-maps. The sub-maps and related files are each stored in different folders of the repository
.
To successfully share a topic in multiple locations of my WebHelp output, I use <topicref "x/y/abc.dita" copy-to="abc.dita"> in the map that's in the folder where the file does not reside.

With the copy-to attribute in a .ditamap, the the transform process generates a local copy of x/y/abc.dita, and when a user clicks the TOC, WebHelp does not get confused and jump the user to the wrong TOC branch.

Here comes the question.

But the links within a shared topic can still jump to the wrong TOC. Can this be fixed?
Maybe I should never put a link within the text of a topic, and rely on TOCs and reltables instead. That would be unfortunate.
ionela
Posts: 402
Joined: Mon Dec 05, 2011 6:08 pm

Re: Using the topicref copy-to attribute with WebHelp output

Post by ionela »

Hi,

Could you please specify what version of oXygen XML and the build number you currently use? You can find this information in oXygen XML menu Help > About.
Also, to further reproduce and investigate this issue on our side, could you please create a minimal valid sample DITA project and send it to us for analysis at: suppport [AT] oxygenxml [DOT] com.

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
Dan02
Posts: 31
Joined: Thu Sep 30, 2021 6:46 pm

Re: Using the topicref copy-to attribute with WebHelp output

Post by Dan02 »

Hi - we just bumped up against this issue in Oxygen 24.1 - is there a fix or workaround?
We are using copy-to and keys attributes on topicrefs that point to a common topic. xref links to the 'duplicate' topics work fine in the HTML output. But if we link to content inside those 'duplicate' topics (for example to a table or a figure), those are broken.
Thanks!
Dan
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: Using the topicref copy-to attribute with WebHelp output

Post by Costin »

Hi,

To investigate the issue you report, we need you to provide a sample DITA Map hierarchy on our support email (support@oxygenxml.com) in an as minimal form as possible.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Using the topicref copy-to attribute with WebHelp output

Post by chrispitude »

Hi Dan, Costin,

I made a testcase here:

ditaot_copy_to_content_keyref.zip
(3.06 KiB) Downloaded 219 times

I can confirm the issue with keyrefs to content inside copy-to'ed topics. Dan, this is a DITA-OT issue that also occurs with the basic html5 transformation, so I suggest filing a DITA-OT issue here.

I also tried reproducing bmerenbloom's WebHelp issue from a few years ago for topics copied to a different directory level, but that seems to be working now (or I didn't reproduce it properly).
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Using the topicref copy-to attribute with WebHelp output

Post by chrispitude »

Because I already had the testcase, I filed a DITA-OT issue:

#4076: Keyrefs to content elements inside @copy-to topics result in bad HTML links
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using the topicref copy-to attribute with WebHelp output

Post by Radu »

Hi,

I also added an internal issue on our side to keep track of the opened DITA OT issue:
OPE-138 Copy-to does not work well with key definitions

Maybe as a workaround you can create multiple topic files on disk and conref to the original topic.
So instead of doing:

Code: Select all

<topicref href="topic.dita" keys="topic2" copy-to="topic2.dita"/>
create an actual "topic2.dita" file on disk which does a conref to the "topic.dita".

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Dan02
Posts: 31
Joined: Thu Sep 30, 2021 6:46 pm

Re: Using the topicref copy-to attribute with WebHelp output

Post by Dan02 »

Hi Radu,
We may well have to resort to that, but we have some products that are very similar, so there are a *lot* of common topics that are referenced in both. Which means "re-creating" topics over and over, which from my POV goes against the spirit of what DITA should be able to provide.
Hopefully the issue gets addressed in some future iteration.
Thanks,
Dan
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using the topicref copy-to attribute with WebHelp output

Post by Radu »

Hello Dan,
I understand, we'll update this forum thread when a fix becomes available.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using the topicref copy-to attribute with WebHelp output

Post by Radu »

Hi,
As an update our latest Oxygen 25.1's bundled DITA OT publishing engine should contain the fix I proposed also on the DITA OT issues list.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply