Page 1 of 1

Add references to sections in the table of contents

Posted: Fri Jan 25, 2019 1:23 pm
by ekb
Hi!
I want to create a large topic with many sections, is it possible to somehow reference these sections in a ditamap to be displayed in table of contents as if they were separate topics? For example, this is the topic:

Code: Select all

<reference id="tocsec" xml:lang="en-us">
<title>Test</title>
<shortdesc>this is a test topic</shortdesc>
<refbody>
<section id="1234">
<title>1234</title>
<p>content1</p>
</section>
<section id="2345">
<title>2345</title>
<p>content2</p>
</section>
<section>
<title>3456</title>
<p>content3</p>
</section>
</refbody>
</reference>
And I would like to have all the content published in one topic, but to make the navigation easier, I'd like to be able to access each of these sections in a table of contents, so to have TOC like this:

Test
1234
2345
3456

I'll be grateful for any hints, thanks!
Ewa

Re: Add references to sections in the table of contents

Posted: Fri Jan 25, 2019 2:26 pm
by Radu
Hi Ewa,

The DITA standard states that a DITA map can only refer to topic-like elements:

https://www.oxygenxml.com/dita/1.3/spec ... icref.html
References to DITA content cannot be below the topic level: that is, you cannot reference individual elements inside a topic.
So you would need to find another solution for this.

Regards,
Radu

Re: Add references to sections in the table of contents

Posted: Fri Jan 25, 2019 2:45 pm
by ekb
Hi Radu,

what a shame... but thanks for the info!

Regards,
Ewa