Incrementing metadata/pattern

Post here questions and problems related to editing and publishing DITA content.
Bas10R
Posts: 34
Joined: Thu May 25, 2023 4:08 pm

Incrementing metadata/pattern

Post by Bas10R »

Hello there,

I have a very specific request, or perhaps a question if something like this is even possible using DITA/Oxygen XML.

I have some DITA content with release notes, to which I need to apply a specific reference/release string. Now, the trick here is that this string must be inserted automatically and consist of the following parts:
- A number
- A text string indicating the type of change (one of three, NEW, MOD, REM)
- A software version to which the change applies

For example, 01-NEW-v2.0, 02-MOD-v2.0, 03-REM-v2.0

Now, the tricky bit is with one of these parts, the number. It needs to increment regardless of the type of change or software version. So if a person creates a new release note, they should have the ability to insert that reference/release string automatically and not worry about the number, as it would increment automatically.

Another layer of complexity is that in the HTML output, I need a way to filter the release notes by the specific modification type or software, but that part seems easy compared to the automation I described in this post.

Kind regards,
Konrad
Radu
Posts: 9084
Joined: Fri Jul 09, 2004 5:18 pm

Re: Incrementing metadata/pattern

Post by Radu »

Hi Konrad,

For the editing part you would probably need to build a custom solution by creating a custom plugin.
Oxygen has support for Java based plugins:
https://www.oxygenxml.com/doc/ug-editor ... ugins.html
A sample plugin which does something along the lines of what you need would be our DITA Prolog Updater plugin, it updates the author name and modification time every time someone saves a topic.:
https://github.com/oxygenxml/oxygen-dit ... ater-addon
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Bas10R
Posts: 34
Joined: Thu May 25, 2023 4:08 pm

Re: Incrementing metadata/pattern

Post by Bas10R »

Thanks, Radu!
Post Reply