oXygen & templates: Include current date as document creation date in XML (not in publication)

TL;DR: How do we create a variable in the template that inserts the current date into the topic document upon creation?

Hi all. We have a series of templates our authors use for their work. In each template's prolog, we have a critical dates section. One of those critical dates is the Created Date, the date at which work began on this topic document (which was based on this template).

Desired end state:

<prolog>

<critdates>

<created date="2019-11-05" />

</critdates>

</prolog>

What's in the templates:

<prolog>

<critdates>

<created date="${date(yyyy-MM-dd)}" />

</critdates>

</prolog>

What's in the final documents:

<prolog>

<critdates>

<created date="${date(yyyy-MM-dd)}" />

</critdates>

</prolog>

You can see the template variable isn't resolved into an actual date.

How do we create a variable in the template that inserts the current date into the topic document upon creation? (It should never be automatically updated.) The date syntax above is from the oXygen help topic https://www.oxygenxml.com/doc/versions/21.1/ug-editor/topics/editor-variables.html.

oXygen Editor 20.1 / Publication Manager 14.0

Thanks!

Parents Reply
  • Update: It's not yet working, but we've duplicated a plugin from within the XML Write Plug-In Settings (Admin.XMLWriteObjPluginConfig.xml) and are messing with it. 

    Our syntax appears good (proof: we can write values) but what we want to do fails. According to our SDL contact and a dev, we need a variable called createdate to be enabled before we can access it. We think once that's done, we should be able to create a working plug-in to write the creation date of a topic into its prolog.

Children
No Data