Page 1 of 1

Changing html IDs between webhelp outpus generated from same DITA source

Posted: Fri Apr 15, 2016 7:06 am
by SunNadimpalli01
Hello,

I would like to understand the reason for the following. I am using oXygenXML Editor 17.0.

I have a DITA topic part of a map, and when I generated the webhelp output from this DITA map, one of the lines in the topic was the following:

Code: Select all

<p class="p"><img class="image" id="task_wct_54b_1r__d1026e42" src="../resources/images/mask-entities-sets-lists.png"></img></p>
A few weeks later, after making changes in some of other topics in the same DITA map, I regenerated the webhelp output. This time there is no change in the HTML content because I did not make any change here, but there is a change in the id assigned to the image.

Code: Select all

<p class="p"><img class="image" id="task_wct_54b_1r__d997e42" src="../resources/images/mask-entities-sets-lists.png"></img></p>
What could be the reason for this change in ID? Is there a way to freeze the IDs once they are generated?

Re: Changing html IDs between webhelp outpus generated from same DITA source

Posted: Fri Apr 15, 2016 8:31 am
by Radu
Hi Sundar,

I tested a little bit and the @id attribute set on the <img> element from the output HTML document was computed from the original @id attribute set on the DITA <image> element from the DITA sources. So probably you changed that ID in the DITA sources which led to the id change in the HTML output.

Regards,
Radu

Re: Changing html IDs between webhelp outpus generated from same DITA source

Posted: Fri Apr 15, 2016 12:28 pm
by SunNadimpalli01
Hi Radu,

Thank you for the reply. In this case I have not edited the ID manually, I have accepted the ID that oXygenXML Editor assigned to it. Do you know in what other cases the ID can change?

I would think that the ID may change if I have copied the image from some other topic or copied the image from another location in the same topic. But in this case I don't think I touched this topic at all. Let me try this on a simple set of files and if I can reproduce it I will share the files with you.

Re: Changing html IDs between webhelp outpus generated from same DITA source

Posted: Fri Apr 15, 2016 12:31 pm
by Radu
Hi Sundar,

If you copy an <image> or any other element with an @id attribute and paste it in the same topic, indeed Oxygen will regenerate the ID for it. Oxygen does this because it is prohibited to have two elements with the same ID in the same topic. So this may be indeed an explanation for the problem you encountered.

Regards,
Radu