Page 1 of 1

Cross-reference to Chapters without a "href"?

Posted: Tue Mar 07, 2017 4:03 pm
by aws
Hello!

I am a technical writer and relatively new to DITA. We have recently changed from using oXygen 16 to oXygen 18 (late, I know...). I love the ability to create chapters without a href in my bookmap. This lets me add a navtitle, and when I publish the PDF, the chapter is included in the Table of Contents.

The source looks like this, for example:

Code: Select all


<bookmap>
<booktitle>
<mainbooktitle>Quick Start Guide</mainbooktitle>
</booktitle>
<chapter href="introduction.dita">
<topicref href="terms_and_definitions.dita"/>
</chapter>
<chapter href="troubleshooting.dita"/>
<chapter navtitle="Technical Specifications"/>
</bookmap>
As you can see, there is no physical file for the chapter "Technical Specifications".

However, this also means I can't seem to create a cross reference to this chapter. When I try to paste the chapter as a cross reference, I get the following pop-up message:

Code: Select all

Cannot perform operation because the copied topicref does not point to a resource (the "href" attribute is missing or is empty).
Does anyone know if there's a workaround for this? Or will I need to create a real, physical .dita file after all?

Re: Cross-reference to Chapters without a "href"?

Posted: Thu Mar 09, 2017 11:20 am
by Radu
Hi,

I see no workaround for this.
Cross references are from topic to topic so you will need to add an @href also on the chapter if you want to link to it from a topic.

Regards,
Radu

Re: Cross-reference to Chapters without a "href"?

Posted: Thu Mar 09, 2017 1:27 pm
by aws
Thanks for the reply!

Just to clarify, this means I need a 'physical' file to refer to, correct? So I'll need to create a .dita file with a title, and then leave the rest of the file empty?

Re: Cross-reference to Chapters without a "href"?

Posted: Thu Mar 09, 2017 2:20 pm
by Radu
Hi,

Yes, exactly. You do not need to leave the file empty. As it's a chapter maybe you can give a short description with a little overview of the entire chapter.

Regards,
Radu

Re: Cross-reference to Chapters without a "href"?

Posted: Fri Mar 10, 2017 11:23 am
by aws
Thank you, I understand :)