Cross-reference to Chapters without a "href"?

Post here questions and problems related to editing and publishing DITA content.
aws
Posts: 3
Joined: Tue Mar 07, 2017 3:56 pm

Cross-reference to Chapters without a "href"?

Post 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?
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
aws
Posts: 3
Joined: Tue Mar 07, 2017 3:56 pm

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

Post 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?
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
aws
Posts: 3
Joined: Tue Mar 07, 2017 3:56 pm

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

Post by aws »

Thank you, I understand :)
Post Reply