Page 1 of 1

Automatically add topicrefs to a ditamap

Posted: Mon Sep 19, 2022 9:01 am
by davenz
Hi all,

Do ditamaps support adding topicrefs of a specified file path automatically?

For example, I have a script that generates many documents automatically. Each document is a discrete topic. The script puts the topics in a folder. Ideally I can use a possible wildcard or variable in the ditamap to automatically add topicrefs to all topics of the folder (instead of manually adding each topicref).

Thanks,
Dave

Re: Automatically add topicrefs to a ditamap

Posted: Mon Sep 19, 2022 10:21 am
by Radu
Hi Dave,
With the DITA standard I'm afraid each DITA topic needs to be referenced individually in the DITA Map.
But there is nothing stopping you to enhance the script to also create a "submap.ditamap" located next to the topics and having references to them. And refer to the submap in the main DITA Map.
Regards,
Radu

Re: Automatically add topicrefs to a ditamap

Posted: Mon Sep 19, 2022 10:24 am
by davenz
Hi Radu -- no prob, thanks for confirming! Will look at a script + submap approach.

Thanks,
Dave

Re: Automatically add topicrefs to a ditamap

Posted: Mon Sep 19, 2022 1:17 pm
by chrispitude
Hi Dave,

We also use the submap method suggested by Radu for a similar situation.

The advantage of this method is that as the files change and the submap is updated, the main map remains unchanged. This is nice for revision control (we use Git) as the revision history of the main map is kept separate from the revision history of the submap.