Related links not working properly with multiple ditaval

Post here questions and problems related to editing and publishing DITA content.
g_m
Posts: 4
Joined: Fri Apr 01, 2022 12:37 pm

Related links not working properly with multiple ditaval

Post by g_m »

Hi,

First off, this is my first post and I hope I posted it in the right section. I searched for the solution on the forum and on the internet, but I was unable to find it, so I thought it would be easier to ask about it here.

I have a situation where I have a master map with six identical submaps. The submap itself is a guide where I have 2 "product" and 3 "props" profiling attribute values. So with it, I can put 6 different guides.

The idea was to create a webhelp output with all six guides listed together. Therefore, I created the master map, referenced the original guide map as submaps six times, and attached to each reference a ditaval file with different profiling settings. It almost worked perfectly.

I have a webhelp website and six, profiled guides.

The problem is that related information (related-links) content doesn't work properly.

During transformation, since the submap is processed six times, six html files per topic are produced, and Oxygen Author changes their names by adding a suffix. Because of that, the original related-link doesn't work as it remains pointed to a file without a suffix. This is despite being processed by ditaval (and I added meta dvrResourceSuffix to change the suffix from "-1" ... "-6" to be more reflective of the profling attributes).

So, for example, I have "blk_wstep_benefity.dita" (translated from Polish "overview and benefits") in the original map, which has a reference link to "blk_wymagania.dita" (requirements).

Code: Select all

<topic id="wstep_i_benefity" xml:lang="pl">
<related-links>
        <link href="blk_wymagania.dita"/>
</related-links>
When produced from the master map six times,  "blk_wstep_benefity.dita" is processed into six "blk_wstep_benefity{suffix}.html" files, but the link inside them remains unchanged, so they all refer to the non-existent existant "blk_wymagania.html" since there are six files "blk_wymagania" with corresponding suffixes. 

I tried everything, I searched for options that could help, but nothing seemed to work. What am I missing? How to ensure that related-links will change names during transformation? I have a feeling this is either something complicated or something very simple :)

BTW, I am using Oxygen XML Author 24.0
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: Related links not working properly with multiple ditaval

Post by Radu »

Hi,

Once you start using branch filtering, all internal links between topics need to be converted to keyrefs and you need to use key scopes, otherwise linking using the file name of the original topic is no longer a good indication to the publishing engine as to what version of the topic you are referring to, the original topic or the one filtered with various filter ditaval files.
So the DITA Map would need to look like this:

Code: Select all

  <topicref href="submap.ditamap" keyscope="ks">
    <ditavalref href="abc.ditaval">
      <ditavalmeta>
        <dvrKeyscopePrefix>abc</dvrKeyscopePrefix>
      </ditavalmeta>
    </ditavalref>
  </topicref>
and in the "submap.ditamap":

Code: Select all

<topicref href="blk_wymagania.dita" keys="wymagania"/>
and the link would look like:

Code: Select all

 <link keyref="wymagania"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
g_m
Posts: 4
Joined: Fri Apr 01, 2022 12:37 pm

Re: Related links not working properly with multiple ditaval

Post by g_m »

Thank you Radu!

Worked as a charm.
Post Reply