Problem with nested chunking

Post here questions and problems related to editing and publishing DITA content.
kgajda
Posts: 32
Joined: Wed Aug 16, 2017 8:07 pm

Problem with nested chunking

Post by kgajda »

I have a Topic Head with the chunk attribute set to "to-content". The 5 child topics show up in the TOC, but only 2 of the 5 show up in the topic as the other 3 are chunked with children themselves. Is there a workaround for this?
cosmin_andrei
Posts: 138
Joined: Mon Jun 12, 2017 10:50 am

Re: Problem with nested chunking

Post by cosmin_andrei »

Hello,

Could you please send us a complete small sample to reproduce the problem on our side?

You can send the sample by email to support [AT] oxygenxml [DOT] com.
Regards,
Cosmin
--
Cosmin Andrei
oXygen XML Editor and Author Support
damarislc
Posts: 9
Joined: Tue Sep 11, 2018 9:23 pm

Re: Problem with nested chunking

Post by damarislc »

Hi

I'm having a similar issue.

Here is the main ditamap:

Code: Select all

<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
    <title>Chunking test map</title>
  <topicref href="generic_topic_1.dita"/>
  <topicref href="topic_with_map_child.dita" chunk="to-content">
    <topicref href="generic_topic_2.dita"/>
    <topicref href="child_map_1.ditamap" format="ditamap"  chunk="to-content" />
  </topicref>
</map>
Here is the nested map:

Code: Select all

<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
    <title>Child map 1</title>
  <topicref href="child_map_topic_1.dita"/>
  <topicref href="child_map_topic_2.dita"/>
</map>
The problem is when the nested ditamap is found with the chunk=to-content, the editors wants that the content from "child_map_1.ditamap" to be duplicated inside its parent "topic_with_map_child.dita" file and also into the file for its current "child_map_1.ditamap".

Currently the output looks like this:
Output file from "topic_with_map_child.dita"
Image
Output file from "child_map_1.ditamap"
Image

But they want that the first file look like this:
Image

But still having the second chunk file.
ionela
Posts: 402
Joined: Mon Dec 05, 2011 6:08 pm

Re: Problem with nested chunking

Post by ionela »

Hi,

Thank you for your example.

Indeed, the issue seems to be caused by the chunk=to-content attribute set on the nested ditamap. The workaround is to set the attribute only on the parent topic topic_with_map_child.dita and removed it from the nested map.

Code: Select all

<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
    <title>Chunking test map</title>
  <topicref href="generic_topic_1.dita"/>
  <topicref href="topic_with_map_child.dita" chunk="to-content">
    <topicref href="generic_topic_2.dita"/>
    <topicref href="child_map_1.ditamap" format="ditamap"/>
  </topicref>
</map>
I hope this helps.

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
Post Reply