Prolog tag in DITA topic

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Shingo Suzuki
Posts: 6
Joined: Sat Jun 25, 2011 3:14 am

Prolog tag in DITA topic

Post by Shingo Suzuki »

Hi,
I'm just beginning to use <oXygen/> Editor 12.2,
I used FrameMaker+DITA-FMx.

- Can oXygen add "prolog" tag in each topic automatically when is created?
- Can value "cridate" attribute be set automatically to the date when it is created?
- Can value "revised" attribute be set automatically to the date when it is saved?

Thank you.
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Prolog tag in DITA topic

Post by Radu »

Hi Shingo,

The new file templates used to create DITA files are all found here:
OXYGEN_INSTALL_DIR/frameworks/dita/templates/

For example if you open the DITA topic file template in Oxygen:
OXYGEN_INSTALL_DIT/frameworks/dita/templates/topic/Topic.dita

you can use in it editor variables supported by Oxygen:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ables.html

For example you can set its content to:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_${id}">
<title>Topic title</title>
<prolog>
<critdates>
<created date="${date(yyyy-MM-dd)}"/>
</critdates>
</prolog>
<body>
<p>Topic paragraph</p>
</body>
</topic>
This means that when you will create a new DTD-based DITA topic in Oxygen using the New dialog wizard the topic will have a prolog and also the created date will be set to the current date using the Oxygen date editor variable.
This would solve the first two requests.

About:
Can value "revised" attribute be set automatically to the date when it is saved?
There is no easy to achieve this from the editor. If you are using a version system like SVN or CVS such systems have support to expand macros when the file gets committed.

If have Java development expertise you could also try to implement a plugin for Oxygen which would modify the file contents on disk after it was closed in Oxygen. If you want to follow this approach I can give you more information.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Shingo Suzuki
Posts: 6
Joined: Sat Jun 25, 2011 3:14 am

Re: Prolog tag in DITA topic

Post by Shingo Suzuki »

Hi, Radu
Thank you very much for quick reply.
It's bad that there is no easy way to achieve the third one.

Thank you again
Post Reply