• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Nested ditamap

Explorer ,
Aug 09, 2017 Aug 09, 2017

Copy link to clipboard

Copied

How do you nest ditamaps so that the html treats them as expandable sections?

I have Ditamap1 that contains Ditamap2 and Ditamap3

Each map has a <title>Name of map</title> element

Ditamap2 contains topic1, topic2, topic3

Ditamap3 contains topic4, topic5, topic6

Currently, when I output to html5  or pdf I get a flat file:

topic1

topic2

topic3

topic4

topic5

topic6

What I'd like is:

Ditamap2-title (expand-collapse)

     topic1

     topic2

     topic3

Ditamap3-title (expand-collapse)

     topic4

     topic5

     topic6

Cheers

Peter

TOPICS
Structured

Views

649

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 09, 2017 Aug 09, 2017

Copy link to clipboard

Copied

When nesting maps, the map itself should impose no hierarchy. Basically all maps are merged into one big map and the map elements disappear. So, if what's inside of your maps is flat (all siblings), that's what you'll get when you publish. If you want the published topics to have a hierarchy (collapsing implies some type of hierarchy), you'll likely need someplace (a topic) for them to collapse into .. but fundamentally, that's up to the tool you're using to produce the HTML, which could be set up to do most anything you want.

To do what you're suggesting, I'd expect that the submaps would look something like this ..

<map>

<title>map title</title>

<topicref href="root-topic-1.xml">

<topicref href="topic1.xml"/>

<topicref href="topic2.xml"/>

<topicref href="topic3.xml"/>

</topicref>

</map>

You'll see that this adds a new "root" topic to each of the submaps. This gives someplace for the topics to collapse into. In general all submaps should have one root topicref. This isn't an absolute requirement, but will generally be closer to what you're expecting to get when you nest maps.

Hope that helps!

...scott

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 09, 2017 Aug 09, 2017

Copy link to clipboard

Copied

Scott,

Many thanks for your quick response.

Cheers

Peter

Sent from my iPad

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 09, 2017 Aug 09, 2017

Copy link to clipboard

Copied

The tool I'm using to generate the html is FM > Publish to Responsive HTML5.

Publishing a ditmap that only contains topics arranged into a hierarchy, for example:

Ditamap2

     Topic1 (placeholder topic as suggested)

          Topic2

          Topic3

Outputs as:

Title (set inside the Publish settings .sts file) in the banner

Topic1 (expand-collapse)

     Topic2

     Topic3

Which is what I'd expect.

Putting Ditamap2 and a similar Ditamap3 inside Ditamap1:

Ditamap1

     Ditamap2

          Topic1

               Topic2

               Topic3

     Ditamap3

          Topic4

               Topic5

               Topic6

Outputs as:

Topic1

Topic2

Topic3

Topic4

Topic5

Topic6

So, putting a ditmap inside another removes the hierarchy completely.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 10, 2017 Aug 10, 2017

Copy link to clipboard

Copied

LATEST

That's unfortunate. Sounds like the Publish command isn't working properly. It should treat the content the same, whether it's in one map or multiple maps. Is this with FM2017?

It's possible that there's some setting ("HonorNestedMaps"??), but I'm not very familiar with the way that works. Perhaps someone else will be able to provide more useful info.

If this doesn't do what you want, you might consider using the DITA-OT. It may or may not do what you want out of the box, but if not, you can customize it to do exactly what's needed.

...scott

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines