Page 1 of 1

Automatic ID generation in web author

Posted: Mon Sep 25, 2017 5:53 pm
by david.badger
Hi,

I'm looking for a way to enable automatic ID attribute generation for DITA documents in the web author. It doesn't look like this is currently supported.

If not, any guidance on the best way to accomplish this in the web author?

Thanks

Re: Automatic ID generation in web author

Posted: Mon Sep 25, 2017 6:58 pm
by cristi_talau
Hello,

I tested the ID generation with Web Author on a simple DITA topic. By default, it generates IDs for several elements like images, tables, etc.
For a custom behavior you can alter the framework associated with your document type. More information here [1].

Let me know if you encounter any problems.

Best,
Cristian

[1] https://www.oxygenxml.com/doc/versions/ ... works.html

Re: Automatic ID generation in web author

Posted: Tue Sep 26, 2017 7:58 pm
by david.badger
I was unable to find specific instructions for setting up ID generation, but I did the following.

I set up DITA ID Options in the desktop editor (added "p" element to the list), then zipped up the DITA framework folder and uploaded to the web author. Then I restarted tomcat. IDs still are not being generated.

Re: Automatic ID generation in web author

Posted: Wed Sep 27, 2017 4:31 pm
by cristi_talau
Hello,

I investigated the problem a little bit more and here is how ID generation is configured:

There are two places where the elements for which IDs are generated can be configured:
1. In the framework idGenerationDefaultOptions.xml file [1]
2. In the Oxygen options file. When you use the "ID generation options" dialog in Oxygen desktop, it saves your input in the options file. You can view this file using "Preferences" > "Export Global Options".
The second configuration takes precedence.

The problem is that the second configuration is not included when you zip the DITA framework. In theory, you could follow the procedure here [2] to pass those options to Web Author. However, Web Author is not able to load the ID generation configuration from the options file. I filed an internal issue to fix this.

So, your only choice right now is to use the first approach and modify the idGenerationDefaultOptions.xml in the DITA framework, then zip the framework and upload it in Web Author.

Best,
Cristian

[1] https://www.oxygenxml.com/doc/versions/ ... e-ids.html
[2] https://www.oxygenxml.com/doc/versions/ ... tions.html

Re: Automatic ID generation in web author

Posted: Wed Sep 27, 2017 5:20 pm
by david.badger
Thank you, I had no idea the idGenerationDefaultOptions.xml file existed. Adding the necessary DITA elements to this file in the DITA framework and uploading to the web author works, and IDs are now being auto-generated.