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

Post here questions and problems related to oXygen frameworks/document types.
KevinGarcia99
Posts: 3
Joined: Fri Nov 11, 2022 7:48 pm

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

Post 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
image.png (36.35 KiB) Viewed 739 times
And, here is the custom template generated from the "New DITA Map" option from the DITA Maps Manager:
image.png
image.png (33.81 KiB) Viewed 739 times
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
vishwavaranasi
Posts: 144
Joined: Fri Feb 28, 2020 4:02 pm

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

Post 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?
Thanks,
vishwa
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply