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

Post here questions and problems related to oXygen frameworks/document types.
vishwavaranasi
Posts: 37
Joined: Fri Feb 28, 2020 4:02 pm

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

Post by vishwavaranasi » Tue Mar 30, 2021 10:55 am

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
Thanks,
vishwa

sorin_carbunaru
Posts: 372
Joined: Mon May 09, 2016 9:37 am

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

Post by sorin_carbunaru » Tue Mar 30, 2021 1:25 pm

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

vishwavaranasi
Posts: 37
Joined: Fri Feb 28, 2020 4:02 pm

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

Post by vishwavaranasi » Tue Mar 30, 2021 3:02 pm

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
Thanks,
vishwa

sorin_carbunaru
Posts: 372
Joined: Mon May 09, 2016 9:37 am

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

Post by sorin_carbunaru » Wed Mar 31, 2021 9:07 am

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);

Post Reply