Page 1 of 1

Automating assembly of a ditamap

Posted: Wed Sep 04, 2019 6:03 am
by antoterrence
Is it possible to automatically build a map without having to create it manually? If you can point me to a direction, that will be great.

Re: Automating assembly of a ditamap

Posted: Wed Sep 04, 2019 9:12 am
by Radu
Hi,

How exactly did you end up with the DITA topics? Did they result from a conversion? Maybe the conversion process could be improved to also generate the DITA Map.
If you create a new DITA Map, save it to disk and open it in the DITA Maps Manager view, you can right click the DITA map root and choose "Append Child->Reference". The dialog which pops up has a file chooser which allows multiple selection so if all your DITA topics are in the same folder you can select them all and topic references will be added to them.
Or you can create an XSLT stylesheet which iterates over all topics in one or multiple folders and adds references to them.

Regards,
Radu

Re: Automating assembly of a ditamap

Posted: Thu Sep 05, 2019 4:52 am
by antoterrence
Thank you for the response. We are not using content from any other source. Let's say we have a list of topics. Can we dynamically create a map using that outline? Also, is it possible to add topics to a map file while publishing content?

Re: Automating assembly of a ditamap

Posted: Thu Sep 05, 2019 10:46 am
by Radu
Hi,

So:
Let's say we have a list of topics. Can we dynamically create a map using that outline?
In what file format is that list of topic references kept?
You can probably write in Oxygen a custom XSLT stylesheet which does that.
Also, is it possible to add topics to a map file while publishing content?
The publishing engine is based on ANT build files and maybe you can create your own custom ANT build file to perform various custom operations before the publishing:

https://www.oxygenxml.com/doc/versions/ ... -file.html

Regards,
Radu