How can I treat a <mapref> as a level of TOC hierarchy?


Chris Papademetrious
 

Hi fellow DITA users,

We are exploring Oxygen's WebHelp Responsive transformation, so I am exploring DITA-OT chunking to understand how to control the help structure.

I have multiple <bookmap> files referenced from a top-level <map>:

<map>
    <title>Online Help</title>
    <mapref href="book1.ditamap"/>
    <mapref href="book2.ditamap"/>
</map>

When I publish this (as WebHelp or as plain html5), the <bookmap> levels evaporate and I get a flat TOC of all book chapters:

  • Chapter 1
    • ...topics...
  • Chapter 2
    • ...topics...
  • Chapter 1
    • ...topics...
  • Chapter 2
    • ...topics...

But what I need is for each book to provide its own navigation level derived from its book title:

  • Book 1 Title
    • Chapter 1
      • ...topics...
    • Chapter 2
      • ...topics...
  • Book 2 Title
    • Chapter 1
      • ...topics...
    • Chapter 2
      • ...topics...

Wrapping each <mapref> in a <topichead> creates a level, but that approach doesn't inherit the book title. (Our books are conditional and often have conditional text, references to variables *within* the book scope, etc.).

I looked at the @chunk attribute documentation and experimented, and:

  • The to-navigation value sounds like what I need, but it is deprecated.
  • The to-content value did create a TOC level named after the book (hooray!), but proceeded to collapse the entire book's contents into a single flat topic (boo!).
  • Other values had no effect when applied to the <mapref> element. (Values set on a <bookmap> apply a policy to the entire map, which felt too intrusive to try.)

Books are big, important things. Hopefully there's a way to do this!

 - Chris

Join main@dita-users.groups.io to automatically receive all group messages.