Page 1 of 1

Problem with automatic ID generation

Posted: Thu Nov 26, 2020 10:22 am
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

Re: Problem with automatic ID generation

Posted: Thu Nov 26, 2020 10:46 am
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

Re: Problem with automatic ID generation

Posted: Thu Nov 26, 2020 11:24 am
by ckabstein
Hi Radu,

That worked! Thank you.

Best regards,
Christina