Page 1 of 1

When creating a new template using the DITA Maps Manager overrides custom ${UUID}

Posted: Wed Aug 02, 2023 9:49 pm
by KevinGarcia99
Hello team,
In our application we have custom templates for creating a DITA Map, for those templates we have something like this:

Code: Select all

<bookmap id="${customUUID}" xml:lang="en-US">
	<booktitle>
		<booklibrary>Example Library</booklibrary>
		<mainbooktitle>Example title</mainbooktitle>
		<booktitlerelease>Release x.x</booktitlerelease>
		<booktitleplatform>For (platform) (optional)</booktitleplatform>
	</booktitle>
As you can see in the above code we declare a pattern ${customUUID} that will be replaced with a custom UUID that is being generated through JAVA code, everything is working fine when we create our custom template using the "New DITA Map" option from the main Oxygen toolbar, but when we create the same custom template using the "New DITA Map" option from the DITA Maps Manager, that value for the ${customUUID} is being replaced with "untitled8" instead of the custom UUID that was generated, does anyone have any clue on why is this happening in the DITA MAPS Manager?

Here is the custom template generated from the "New DITA Map" option from the main Oxygen toolbar:
image.png
And, here is the custom template generated from the "New DITA Map" option from the DITA Maps Manager:
image.png

Re: When creating a new template using the DITA Maps Manager overrides custom ${UUID}

Posted: Thu Aug 03, 2023 8:12 am
by Radu
Hi,

In the Oxygen Preferences->"DITA / Topics" page there is a checkbox named "Use the file name as a value for the root ID attribute". This feature can be unchecked if you want to preserve the original ID value from the new file template.

Regards,
Radu

Re: When creating a new template using the DITA Maps Manager overrides custom ${UUID}

Posted: Thu Aug 03, 2023 9:42 am
by vishwavaranasi
Thanks Radu.
Oxygen Preferences->"DITA / Topics" page there is a checkbox named "Use the file name as a value for the root ID attribute".
how can we implement the same using Oxygen API's?

Re: When creating a new template using the DITA Maps Manager overrides custom ${UUID}

Posted: Thu Aug 03, 2023 11:18 am
by Radu
Hi,

Maybe when your plugin's "applicationStarted" callback is received you could force set the setting to false;

Code: Select all

PluginWorkspaceProvider.getPluginWorkspace().setGlobalObjectProperty("new.dita.topic.use.file.name.for.root.id", Boolean.FALSE);
Regards,
Radu