Page 1 of 1

Using the topicref copy-to attribute with WebHelp output

Posted: Fri Jun 14, 2019 5:33 pm
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.

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

Posted: Wed Jun 19, 2019 12:06 pm
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

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

Posted: Wed Dec 07, 2022 5:48 am
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

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

Posted: Thu Dec 08, 2022 12:53 pm
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

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

Posted: Thu Dec 08, 2022 4:28 pm
by chrispitude
Hi Dan, Costin,

I made a testcase here:

ditaot_copy_to_content_keyref.zip
(3.06 KiB) Downloaded 208 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).

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

Posted: Thu Dec 08, 2022 9:49 pm
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

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

Posted: Mon Dec 12, 2022 9:30 am
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

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

Posted: Mon Jan 16, 2023 10:47 pm
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

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

Posted: Tue Jan 17, 2023 8:40 am
by Radu
Hello Dan,
I understand, we'll update this forum thread when a fix becomes available.
Regards,
Radu

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

Posted: Fri Mar 17, 2023 3:00 pm
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