Create Parts in Ditamaps

Post here questions and problems related to editing and publishing DITA content.
amyers3
Posts: 28
Joined: Sat Feb 16, 2019 8:43 pm

Create Parts in Ditamaps

Post by amyers3 »

I know there is a part element for bookmaps, I'm wondering if there is a documented procedure for creating parts in a ditamap so that TOC links for parts work and PDF Bookmarks for parts work.
PART I: Something
Chapter 1: Something
Chapter 2: Something Else
PART II: Something Else
Chapter 3: Continue

Thanks,
Adam
Adam Myers
Technical Publications Manager
MATRIXX Software
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Create Parts in Ditamaps

Post by chrispitude »

Hi Adam,

If it helps, the <part> element can point to a topic file just like chapters, etc. So you could do something like

Code: Select all

<part href="part1.dita">
  <chapter ...>
    <topicref .../>
  </chapter>
</part>
Are you creating PDF outputs, HTML outputs, or both?

- Chris
amyers3
Posts: 28
Joined: Sat Feb 16, 2019 8:43 pm

Re: Create Parts in Ditamaps

Post by amyers3 »

Hi Chris,
I have pdf and html output. The part element isn't a valid DITA map element.
Thanks,
Adam
Adam Myers
Technical Publications Manager
MATRIXX Software
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Create Parts in Ditamaps

Post by chrispitude »

HI Adam,

For HTML-based outputs, if you navigate to an "empty" map element that has no topic content associated with it (like a <part> with a navtitle but no @href to a topic), then you are taken to the next element in the map that does have content. So adding placeholder topics to these elements might do what you want.

I think PDF outputs do not have this requirement, and PDF bookmarks can point to title-only placeholders.

- Chris
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: Create Parts in Ditamaps

Post by julien_lacour »

Hi Adam,

Besides what Chris said, <part> element is only valid in a <bookmap> not in a classic ditamap.
You can check the DITA specs for more details.

You can use Tools > XML Refactoring dedicated "Convert DITA Map to Bookmap" operation to transform your ditamap and start using <part>.

Regards,
Julien
amyers3
Posts: 28
Joined: Sat Feb 16, 2019 8:43 pm

Re: Create Parts in Ditamaps

Post by amyers3 »

Thanks. I have already checked the specs. I was hoping someone had a workaround. I don't want to convert all of my ditamaps to bookmaps.
Adam Myers
Technical Publications Manager
MATRIXX Software
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Create Parts in Ditamaps

Post by chrispitude »

Hi Adam,

One workaround would be to define your own @outputclass values on <topicref> or <topichead> map elements, then write your own DITA-OT plugin to make this work somehow -- either by turning your map into a bookmap during "mapref" reading in preprocessing, or by implementing overrides in all the transtype-specific extension points you might publish to.

But at that point, it seems easier (and more reliable!) to simply use a bookmap.
amyers3
Posts: 28
Joined: Sat Feb 16, 2019 8:43 pm

Re: Create Parts in Ditamaps

Post by amyers3 »

Sounds like it. Thanks Chris.
Adam Myers
Technical Publications Manager
MATRIXX Software
Post Reply