Page 1 of 1

Creating a MAP of distinct MAPs

Posted: Wed Sep 07, 2016 10:16 pm
by XMLinator
Hi everyone,

I've got a problem that I've been tinkering with and am having difficulty getting the output I am looking for. I am hoping the experts have some advice.

My situation is pretty simple:

I have a bunch of MAPs (let's say 20 MAPs) that stand on their own to create documents.

I would like to create a master MAP in which I could insert all of these MAPs to create an output that, more or less, produces a PDF that, in this case, contains 20 top level items - 1 for each MAP.

What I'm coming up against is that when the MAP is created it just renders/includes the topics that are contained within the MAPs. Thus, my PDF looks like one big book of topics when I'd like to have a big book of smaller, clearly distinguishable books.

For example, let's say:

I have a MAP called "Test MAP" that contains two topics: Test A and Test B.
I have another MAP called "The other MAP" that contains two topics: Other A and Other B.

When I pull these two MAPs into a master MAP and create the PDF, I see the contents as being:

Test A
Test B
Other A
Other B

When I would like them to be:

Test MAP
->Test A
->Test B
The other MAP
->Other A
->Other B

Is this possible? If so, what am I missing?

Thanks in advance for any advice!

Re: Creating a MAP of distinct MAPs

Posted: Thu Sep 08, 2016 11:15 am
by alin
Hello,

The behavior you have encountered is correct. The DITA 1.2 specification for "mapref" states that:
The hierarchy of the referenced map is merged into the container map at the position of the reference, and the relationship tables of the child map are added to the parent map.
See: https://docs.oasis-open.org/dita/v1.2/o ... apref.html

To achieve your desired output you may consider wrapping the map references into "topichead" elements, specifying a "navtitle" for each of them.
For example:

Code: Select all


    <topichead navtitle="Test Map">
<mapref href="maps/testMap.ditamap"/>
</topichead>
<topichead navtitle="The other Map">
<mapref href="maps/theOtherMap.ditamap"/>
</topichead>
Unfortunately you will not obtain individual tables of contents at the beginning of each inner map. There will be a single table of contents for the master map.

Regards,
Alin

Re: Creating a MAP of distinct MAPs

Posted: Thu Sep 08, 2016 2:01 pm
by XMLinator
Hi Alin, and thanks for your reply.

As luck would have it, I came back to report that I had the same thought as you describe. It occurred to me that this would be the expected behavior (not sure why I stumbled on that). Once I realized that, I did exactly as you describe and it produced satisfactory output. I'm comforted to know that I'm not too far off base. :)

Again, thanks very much for your reply. Have a great day.