Page 1 of 1

Using a Conref in a Topic Title

Posted: Mon Jun 13, 2022 6:57 pm
by Aidan400
Hello,
I am storing product names in a topic file for conrefs, e.g.:
conref_file.dita

Code: Select all

<topic>
<title>Conrefs: Product names</title>
  <body>
    <dl>
      <dlentry>
        <dt>General term for the product</dt>
        <dd><ph id="cool_product_id">PRODUCT</ph></dd>
      </dlentry>
    </dl>
  </body>
</topic>
I would like to use the product name in the title of a topic in a bookmap, e.g.:
topic_file.dita

Code: Select all

<task>
<title>title with a conref: <ph conref ="path/conref_file.dita/cool_product_id"/></title>
  <taskbody>
  </taskbody>
</task>
While this does not appear to give any errors, it does not work as expected in the DITA Maps Manager. In the case above, for example, it would show something like "title with a conref: " instead of the expected "title with a conref: PRODUCT". I have not tested publishing the topic, so I am not sure if it publishes correctly.

Is this a bug, or is it bad form to use a conref in a title? Or am I simply using the conref incorrectly?
Thank you very much.

Re: Using a Conref in a Topic Title

Posted: Tue Jun 14, 2022 6:13 am
by Radu
Hi,

What version of Oxygen are you using?
The conref should look something like this:

Code: Select all

<ph conref="topics/introduction.dita#topicID/cool_product_id"/>
where the "topicID" part is the value of the @id attribute defined on the target "<topic" element.
Using Oxygen 24.1 the DITA Maps Manager seems to properly expand the conref in the title of the referenced topic.
Of course for such cases you can also use plain key definitions and key references:
https://www.oxygenxml.com/doc/versions/ ... -keys.html

Regards,
Radu

Re: Using a Conref in a Topic Title

Posted: Wed Jun 15, 2022 11:42 pm
by Aidan400
Hi,
I am using Oxygen XML Author 21.1, build 2019071807.
My example in my previous post was incorrect, but it does appear that the actual XML I am working with has a similar format to the conref in your reply: something like <ph conref="/Content/conref_productName.dita#xd_topicid/cool_product_id"/>.

Re: Using a Conref in a Topic Title

Posted: Thu Jun 16, 2022 6:05 am
by Radu
Hi,

Oxygen 21.1 is in our end of life stage so officially we no longer support it in any way:
https://www.oxygenxml.com/eol.html

But I tested this with an Oxygen 21.1 installation and a very small DITA Map + topic sample and it works for me, the conref is expanded in the map title in the DITA Maps manager:
Screen Shot 2022-06-16 at 06.01.18.png
I'm working with files on the local disk though, if you are working with Oxygen and a Content Management System (CMS), the CMS implements various Oxygen APIs and the behavior for computing topicref titles may alter in a way which is not controlled by us.

Regards,
Radu