Using custom ID generation in document template

Post here questions and problems related to oXygen frameworks/document types.
Posts: 33

Using custom ID generation in document template

Tue Feb 25, 2014 7:19 pm

If a document template uses the ${id} variable, the ID value is generated when a new document is based on that template.
Is it possible to call a custom ID generation ?

I tried by replacing

Code: Select all

<topic id=${id}>


Code: Select all

<topic id=${com.mycompany.oxygen.MyGenerateIDsOperation}>

but it does not work.
Note: com.mycompany.oxygen.MyGenerateIDsOperation is defined as an action in my custom framework and is working OK from the menu.

Posts: 652

Re: Using custom ID generation in document template

Wed Feb 26, 2014 11:25 am


We currently do not support custom editor variables, so you cannot plug your own ID generation mechanism using only the editor variables support. We added an internal issue to add support for this kind of custom editor variables, and we will notify you once it will be implemented. But maybe you can resolve the ID generation by using a combination of our default editor variables. A list is available at [5].

Meanwhile you will have to use our Java API [1] to set the ID attribute. You can get a notification when a document is opened with [2] (framework level API) or [3],[4] (plugin level API).

[1] ... a-api.html
[2] ... tener.html
[3] ... lugin.html
[4] ... ,%20int%29
[5] ... ables.html

Best regards,
Posts: 5867

Re: Using custom ID generation in document template

Wed Apr 01, 2015 10:29 am


Just to update this thread, Oxygen 16.1 has this new Java API which can resolve any custom editor variable:


Radu Coravu
<oXygen/> XML Editor

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests