Automatically add topicrefs to a ditamap

Post here questions and problems related to editing and publishing DITA content.
davenz
Posts: 26
Joined: Mon Mar 11, 2019 11:53 am

Automatically add topicrefs to a ditamap

Post 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
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Automatically add topicrefs to a ditamap

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
davenz
Posts: 26
Joined: Mon Mar 11, 2019 11:53 am

Re: Automatically add topicrefs to a ditamap

Post by davenz »

Hi Radu -- no prob, thanks for confirming! Will look at a script + submap approach.

Thanks,
Dave
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Automatically add topicrefs to a ditamap

Post 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.
Post Reply