Problem with automatic ID generation

Post here questions and problems related to editing and publishing DITA content.
ckabstein
Posts: 150
Joined: Fri Apr 24, 2015 12:28 pm

Problem with automatic ID generation

Post by ckabstein »

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 25.1 build 2023070306
DITA OT 3.7.4
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem with automatic ID generation

Post by Radu »

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: 150
Joined: Fri Apr 24, 2015 12:28 pm

Re: Problem with automatic ID generation

Post by ckabstein »

Hi Radu,

That worked! Thank you.

Best regards,
Christina
oXygen XML Editor 25.1 build 2023070306
DITA OT 3.7.4
Post Reply