Page 1 of 1

Oxygen editor variables is not picked up to generate a id for the topic

Posted: Tue Mar 30, 2021 10:55 am
by vishwavaranasi
Hello Team , We have this

custom topic template xml to create a new topic uses custom variable customtoipcID ' to create a unique topic id for a newly created topic

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//xxxx//DTD xxx DITA Topic//EN" "xxxtopic.dtd">
<topic id="${customtoipcID}">
    <title></title>
    <body></body>
</topic>

When we create a topic from File -> New - and then create a topic using topic template , this creating a new topic with the unique ID as below

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//xxxx//DTD xxx DITA Topic//EN" "xxxtopic.dtd">
<topic id="6B2BC63F-8617-46A4-91AE-8EF1CA2D2DE4">
    <title></title>
    <body></body>
</topic>

But where as when we cretae a new topic from -> from a DIAMaps Manger Viw -> Append Child -> new -> then create a topic using topic template
this is just creating a topic as below

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//xxxx//DTD xxx DITA Topic//EN" "xxxtopic.dtd">
<topic id="untitled3">
    <title></title>
    <body></body>
</topic>
here the Oxygen editor variables is not picked up to generate a id for the topic?

thanks for your help.


Thanks,
vishwa

Re: Oxygen editor variables is not picked up to generate a id for the topic

Posted: Tue Mar 30, 2021 1:25 pm
by sorin_carbunaru
Hello,

Thank you for reporting this to us! This is a know issue (ID = EXM-43014), and I added your vote to it.

As a workaround, you can go to the Options menu > Preferences > DITA page > Topics sub-page and deactivate the Use the file name as the value of the root ID attribute option.

Regards,
Sorin Carbunaru
Oxygen XML Editor

Re: Oxygen editor variables is not picked up to generate a id for the topic

Posted: Tue Mar 30, 2021 3:02 pm
by vishwavaranasi
Thanks Sorin Carbunaru.

is there any way to uncheck the checkbox Options menu > Preferences > DITA page > Topics sub-page and deactivate the Use the file name as the value of the root ID attribute option.

using Oxygen Plugin API?

Thanks,
vishwa

Re: Oxygen editor variables is not picked up to generate a id for the topic

Posted: Wed Mar 31, 2021 9:07 am
by sorin_carbunaru
Hi,

Yes, you can use the following API: ro.sync.exml.workspace.api.options.GlobalOptionsStorage.setGlobalObjectProperty(String, Object). The first argument value (the option key) is "new.dita.topic.use.file.name.for.root.id". So, the code would look like this:

Code: Select all

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