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


Dan Vint
 

I don't work with bookmarks but use map so I'm not sure of all the title derails. Sub maps do not interject structure and then don't introduce their own titles, they disappear as you have seen. The OT strip the map elements and chains them together during processing.

You had the right solution with the topic head, just make that the first element in your bookmap (if allowed). Put a simple title on the bookmap itself and make the text of your topchead contain the conditions to make the correct title.



Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: Chris Papademetrious <chrispitude@...>
Date: 6/19/21 7:41 AM (GMT-08:00)
To: main@dita-users.groups.io
Subject: [dita-users] How can I treat a as a level of TOC hierarchy?

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.