DITA Webhelp doesn't follow map hierarchy

Having trouble installing Oxygen? Got a bug to report? Post it all here.
mdslup
Posts: 167
Joined: Tue Mar 06, 2018 1:34 am

DITA Webhelp doesn't follow map hierarchy

Post by mdslup »

I have a very simple map set up:

Master Map
-- Submap 1
----Topic 1
----Topic 2
--Submap 2
----Topic 3
----Topic 4

When I generate the webhelp, the resulting index file ignores the fact that there are 2 submaps. Instead, it looks like this:

index.html
Topic 1 (link)
Topic 2 (link)
Topic 3 (link)
Topic 4 (link)

How can I make the output so that it looks like this:

index.html
Submap1
Topic 1 (link)
Topic 2 (link)
Submap2
Topic 3 (link)
Topic 4 (link)

Thanks.
Costin
Posts: 830
Joined: Mon Dec 05, 2011 6:04 pm

Re: DITA Webhelp doesn't follow map hierarchy

Post by Costin »

Hi mdslup,

Please note that the <mapref> element acts only as a container for the content coming from other DITA Map, merging the hierarchy of the referred DITA Map to the one from the container map. This is explained better HERE in the DITA specification.

As it is considered only a container by the DITA transformation, the mapref element itself is not present in the output, only the topics hierarchy it refers is present. So the behavior you report is intended.
In case you also need the referred map to appear in the output, an idea would be to use a <topichead> with a navtitle attribute set on it and include the DITA Map through a child <mapref> element.
You can see an example of this in the same page that I mentioned above (see "Figure: Map that reuses lib.ditamap").

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
mdslup
Posts: 167
Joined: Tue Mar 06, 2018 1:34 am

Re: DITA Webhelp doesn't follow map hierarchy

Post by mdslup »

Understood, thanks.
Post Reply