Problem with automatic ID generation

ckabstein
Posts: 107
Joined: Fri Apr 24, 2015 12:28 pm

Problem with automatic ID generation

Post by ckabstein » Thu Nov 26, 2020 10:22 am

Hello,

I have configured the idGenerationDefaultOptions.xml in our framework as follows:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!-- ID Generation default options for DITA -->
<idGeneration>
    <autoGenerate>true</autoGenerate>
    <idAttribute>id</idAttribute>
    <idPattern>${localName}_${id}</idPattern>
	<generateForElement>topic/section</generateForElement>
</idGeneration>
This helped remove all the other IDs that were automatically generated with the default file.
However, we have noticed that still some other IDs are being generated for <result> or <postreq>, for example. I haven't found any other elements so far, but there could be more.
Is there a reason why this happens?
Is there a way to take those out? We don't need automatic IDs for those elements.

Thanks,
Christina
oXygen XML Editor 23.1 build 2021061407
DITA OT 3.6

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

Re: Problem with automatic ID generation

Post by Radu » Thu Nov 26, 2020 10:46 am

Hi Christina,

I'm afraid that with the DITA specialization model the "result" and "postreq" extend "topic/section" so the pattern also applies to them.
Maybe instead of "topic/section" you can match directly "section":

Code: Select all

<generateForElement>section</generateForElement>

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

ckabstein
Posts: 107
Joined: Fri Apr 24, 2015 12:28 pm

Re: Problem with automatic ID generation

Post by ckabstein » Thu Nov 26, 2020 11:24 am

Hi Radu,

That worked! Thank you.

Best regards,
Christina
oXygen XML Editor 23.1 build 2021061407
DITA OT 3.6

Post Reply