Find files with duplicate topic titles in a ditamap

Are you missing a feature? Request its implementation here.
kj_rk
Posts: 30
Joined: Thu Jul 15, 2021 10:01 am

Find files with duplicate topic titles in a ditamap

Post by kj_rk »

Hi Oxygen team,
Is there a way to list all the files in a ditamap or bookmap that have the same topic title?
I tried looking for some custom actions, but found "find.similar.topics". But, I am looking for something to match the titles exactly.
If there is a way to do this using Schematron, would you kindly provide the check?

Thanks
Radu
Posts: 9212
Joined: Fri Jul 09, 2004 5:18 pm

Re: Find files with duplicate topic titles in a ditamap

Post by Radu »

Hi,
We do not have such a custom action. And Schematron does not help because it is applied on each individual topic.
For such an action to work you would need to collect all titles from all topics in the DITA Map. For each title you would also need to have a counter of how many times the title is repeated.
If I were to attempt to find out something like this, I would first open the DITA Map in the DITA Maps Manager view, then use the "Configure Transformation Scenarios" toolbar button and in the Configure Transformation Scenarios" dialog use "New->DITA OT transformation" and create a transformation scenario of type "Merge DITA content to single XML file". Then execute the transformation scenario and you will have one big XML file where all the topicrefs are expanded. Then I would create a custom XSLT stylesheet to count titles.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
kj_rk
Posts: 30
Joined: Thu Jul 15, 2021 10:01 am

Re: Find files with duplicate topic titles in a ditamap

Post by kj_rk »

Thanks for your response, Radu!
Post Reply