Page 1 of 1

Force ID generation off in Oxygen configuration

Posted: Tue Nov 12, 2013 10:15 am
by davidprice
As part of a customized DITA environment that's using Oxygen 14.2, we need to turn off ID generation on insertion of <image> and <object> for our authors (for reasons stemming from our CMS). I know that we can do this manually by asking users to go to the "DITA -> ID Options..." menu, but we'd like to be able to do this automatically on installation of our tools into the environment. We're already replacing the stock dita.framework, ditamap.framework, and ditaval.framework files on installation in order to put our own settings there (after backing those files up, of course), along with our own DITA-OT instance. Is there a good way to turn off ID generation for <image> and <object> tags by adding a configuration option to any of those files? Or another way to set this programmatically? Our environment is tightly locked to Windows and Oxygen 14.2 and we're able to execute code when our installation package runs, if that's useful.

Thanks,
David

Re: Force ID generation off in Oxygen configuration

Posted: Tue Nov 12, 2013 12:52 pm
by alex_jitianu
Hi David,

You will have to use the Java based API. You must extend DITAUniqueAttributesRecognizer and override the getDefaultOptions() method. You must return a GenerateIDElementsInfo object with only the class values for which you want to generate IDs. Next you must extend DITAExtensionsBundle and create an instance of your class and return it (the same instance) on methods getUniqueAttributesIdentifier(), createAuthorExtensionStateListener() and getClipboardFragmentProcessor().

The source code for all these classes is available inside Author SDK. So you can see how they are implemented and get a better understanding about what you must do.

Best regards,
Alex