WebHelp: Generated XREF link text contains only URL

Post here questions and problems related to editing and publishing DITA content.
rwmm415
Posts: 2
Joined: Mon May 15, 2023 7:23 pm

WebHelp: Generated XREF link text contains only URL

Post by rwmm415 »

Hi All,
I'm trying to create a WHR version of a very large existing OxyXML project containing thousands of internal xrefs of the form
<xref href="internal-link-url" />. This construct relies on OxyXML's ability to extract meaningful link text from the href target -- typically the title of a figure, table, or topic.

This works perfectly 100% of the time when building the PDF version of the document. But in the case of webhelp, only about 20% of the xrefs produce the correct entity-title link text. The rest are rendered as URLs -- long, ugly, uninformative URLs such as in the following example:

“For the system to be in the "ON" mode, the logic, as shown in the flowchart o1even.html#o1even_emergency_cooling_system_323__fig_bc1_lmh_15b is implemented within the HAAL9000 code.”

The URL is correctly hyperlinked, but the sentence should contain a figure title such as "Failure Scenario 323", not the URL.

From experimentation I know that this issue is related to "chunking" - the aggregation of several related dita files together into a single webhelp html file. If I remove the chunk="to-content" attribute from the top-level topicrefs, the links then render correctly. The use of chunking is essential to this document, however. Turning it off is not an option.

I know that I can manually provide the link text -- i.e., <xref href="..."> correct link text goes here </xref> -- to solve the problem, but there are thousands instances scattered across 1000+ dita files that would have to be located and corrected. It's a large enough effort that it would need to be automated with scripting. And, it would be kind of silly as I would be recreating logic that's already built into the WHR transformation.

So, I am hoping that someone will recognize the situation I'm describing here, and know of some fix or workaround that I can apply in my case. Thanks!
marius
Posts: 39
Joined: Thu Mar 05, 2009 11:44 am

Re: WebHelp: Generated XREF link text contains only URL

Post by marius »

Hi,
To better understand your issue it would be great if you can put together a small valid dita project that illustrates the problem and then send it to us on the support channel.
Regards,
Marius
Marius Ciolacu
Syncro Soft / Oxygen XML
Post Reply