Cross-reference to Chapters without a "href"?

aws
Posts: 3

Cross-reference to Chapters without a "href"?

Tue Mar 07, 2017 4:03 pm

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: 5757

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

Thu Mar 09, 2017 11:20 am

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

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

Thu Mar 09, 2017 1:27 pm

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: 5757

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

Thu Mar 09, 2017 2:20 pm

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

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

Fri Mar 10, 2017 11:23 am

Thank you, I understand :)

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 0 guests