PDF: no link resolution between conrefs
Posted: Wed Jul 13, 2016 11:02 am
Hi all,
as you may already know, I'm not very familiar with DITA, so this question may feel very noobish.
Imagine the following scenario (see code snippets below): I have a major topic which includes two other minor topics via conref. One of the minor topics is referencing the other minor topic via xref.
If you are generating a PDF output the title of the xref target will be pulled correctly but the link isn't set (you can't click on it) and the warning "Unresolved ID reference "unique_3" found." will be generated in the console.
Major topic:
Minor topic 1 (holding the link)
Minor topic 2 (link target)
However, this seem to work, if you change the target of the link in the "minor topic 1" file to the conref itself via
Minor topic 1 (holding the link)
but in this case, oXygen will show you an empty link in "Author" mode. It looks like it doesn't resolve the title of the target.
I'm not sure, if conrefs are allowed to be used in this way. So my questions are:
Bernhard
as you may already know, I'm not very familiar with DITA, so this question may feel very noobish.

Imagine the following scenario (see code snippets below): I have a major topic which includes two other minor topics via conref. One of the minor topics is referencing the other minor topic via xref.
If you are generating a PDF output the title of the xref target will be pulled correctly but the link isn't set (you can't click on it) and the warning "Unresolved ID reference "unique_3" found." will be generated in the console.
Major topic:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_op5_bx3_pw">
<title>Some topic</title>
<topic id="id_yc2_324_pw" conref="conref1.dita#concept_hmz_dg3_3v">
<title/>
</topic>
<topic id="id_cs5_324_pw" conref="conref2.dita#topic_jzr_wm3_pw">
<title/>
</topic>
</topic>
Minor topic 1 (holding the link)
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<dita>
<topic id="concept_hmz_dg3_3v">
<title>Conref 1</title>
<body>
<p><xref href="conref2.dita#topic_jzr_wm3_pw"/></p>
</body>
</topic>
</dita>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_jzr_wm3_pw">
<title>Conref 2</title>
<body>
<p>Text</p>
</body>
</topic>
Minor topic 1 (holding the link)
Code: Select all
<xref href="major_topic.dita#id_cs5_324_pw"/>
I'm not sure, if conrefs are allowed to be used in this way. So my questions are:
- Is this a bug in DITA with xref or is it just out of the specification? Maybe conrefs aren't supposed to be used in this way.
- Is it possible for oXygen to resolve the target so the link text in Author mode doesn't stay empty?
- Is there another way of pulling the content in? I don't want to put both minor topics in the DITA map as a child of the major topic. If you generate HTML output of this, this will get translated into real links. As a result if you open the HTML output of the major topic file, it will just hold a title and two links. I think this is kind of confusing and is not that helpful, is it?
Bernhard