Skip to main content
Inspiring
April 24, 2014
Question

Topichead does not convert properly when ditamap saved as book and hierarchy not maintained

  • April 24, 2014
  • 1 reply
  • 389 views

I'm new to DITA and piloting some documents in FrameMaker 12, trying to get the output that I need.

I have created a ditamap with a structure as follows:

Map title

- Concept A

- Topichead

   - Task A

   - Task B

- Concept B

  - Task C

   - Task D

I would like this to ouptut a PDF with TOC and bookmarks as follows:

Map title => book title

- Concept A => Chapter 1

- Topichead => Chapter 2

   - Task A => Chapter 2.1

   - Task B => Chapter 2.2

- Concept B => Chapter 3

  - Task C => Chapter 3.1

  - Task D => Chapter 3.2

To do this I save the ditamap as a "Book 12.0 with fm components (*.book)" and set the Bookmark levels in the PDF Setup as follows:

ChapterTitle

head.0

Title

title.0

.title.1

..title.2

...title.3

However, the output systematically comes out wrong because the Topichead element, which is just a title and is not attached to any topic, is not taken into account as a hierarchical element in the output. It generates an empty fm document containing just the topichead title, output as a ChapterTitle or Title depending on whether I set its toc attribute to yes. But the TOC is all wrong - instead of taking Task A and Task B as children of Chapter 2 it puts them all at level 1 so I get:

- Concept A => Chapter 1

- Topichead => ignored

   - Task A => Chapter 2

   - Task B => Chapter 3

- Concept B => Chapter 4

  - Task C => Chapter 4.1

  - Task D => Chapter 4.2

If I output using the bog-standard DITA-OT instead of fancy and expensive FrameMaker, everything comes out correctly.

Is there any way to correct this?

Thanks,

Archaeopteryx

This topic has been closed for replies.

1 reply

ScottPrentice
Inspiring
April 24, 2014

Hi Archaeopteryx...

I beieve that FM only uses the elements from topics to create the output .. as you're seeing, headings in the map are ignored. I also believe that the process that FM uses to aggregate the topics into FM files is hard-coded somewhere in the DITA plugin, and not exposed for modification .. so aside from developing a plugin to modify the process, I think you're out of luck if you're using the default DITA support. The only solution would be to include title-only topics in the structure that provide those headings rather than using a topichead.

However, you might want to check out DITA-FMx, in which the aggregation process is controlled by XSLT that you are free to modify. The default book-build process in DITA-FMx also ignores these map elements, and assumes that all content is defined in topics, but you could tweak the XSLT to include topicheads as topic headings in the generated book.

     http://leximation.com/dita-fmx/

Thanks,

Scott Prentice

Leximation, Inc.

www.leximation.com

Inspiring
April 24, 2014

Thanks for your help. Looks like I'll just have to give up on theTopichead, or give up on Frame and use a simpler XML editor.

Cheers,

Archaeopteryx