Delete prolog data for DITA XML template?

Questions about XML that are not covered by the other forums should go here.
johnnsb
Posts: 6
Joined: Mon Nov 10, 2008 9:55 am

Delete prolog data for DITA XML template?

Post by johnnsb »

I am porting some DITA XML Templates from a legacy CMS and using them in oXygen 10. I am trying to figure out if I should delete some of the prolog data that we used previously in our template that applied with our CMS. That prolog data was used in connection with some drop-down menuing in the CMS to allow writers to select some of the values that would apply when we created a new topic.

For example, the prolog data in these old templates allowed us (in the resultant interface in the CMS to have a choice of platform, choice of product, network type, outputting (hideforPDF or show for PDF), etc. all when we created a new topic.

In moving these templates to oXygen, I am planning to use DITAVAL for conditional processing, but I am wondering if there is any value in leaving this "legacy" prolog data in the DITA templates I establish in oXygen, and then subsequently find a new to integrate a menuing option or other selection for when a user instantiates a topic, in oXygen, based on this prolog data. In other words, a way to mimic the old behavior in the CMS we used and move it forward into oXygen.

I would be thrilled to have any answers or opinions on this, as I am truly in the Information Arch phase of this new system and would like to establish a set of templates for users. Before I do this, I need to know if my templates should be vanilla or if this prolog data should be left in for a possible implementation in oXygen.

Thank you.
John

(my apologies in advance if this is not the correct discussion group)
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Delete prolog data for DITA XML template?

Post by Radu »

Hi John,

File templates in Oxygen are used "as-it-is" so their content is exactly what the user will see when creating a new file with "New->From templates".
So there is no need to keep the original prolog data if it was just something used by the previous application.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
johnnsb
Posts: 6
Joined: Mon Nov 10, 2008 9:55 am

Re: Delete prolog data for DITA XML template?

Post by johnnsb »

Thanks for the reply, Radu. I understand that the default templates work as you say, but I do have some customized work there that I like. Could the following work?

1.) Modify old templates, add standard DTD declaration and path to DITA-OT.
2.) Modify CSS in old templates to use oXygen CSS file
3.) Add this legacy template directory in oXygen via Preferences-->Templates/Document Templates. This will allow authors who have been using our templates to still access them via "New.../From template" on menu bar

I think this all seems sound. Then the last question is (reforming it to see if it makes sense) really whether or not if I WANTED to keep the prolog information I have in these templates, is there any method of integration (or custom work or some API) that would allow me to access the attributes in the prolog when an author is working in a topic so that they can select elements like "SUN" or "LINUX" for a platform attribute.

Regards,
John
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Delete prolog data for DITA XML template?

Post by Radu »

Hi John,

See some answers below:
johnnsb wrote: 1.) Modify old templates, add standard DTD declaration and path to DITA-OT.
Yes, you need to have a correct DTD declaration in your DITA templates.
You can check out the declarations in our own DITA templates.
johnnsb wrote: 2.) Modify CSS in old templates to use oXygen CSS file
This is not necessary, if you have no CSS association associated in your DITA topics/maps Oxygen will detect their type and choose the default one for rendering which is OXYGEN_INSTALL_DIR/frameworks/dita/css-classed/dita.css.
johnnsb wrote: 3.) Add this legacy template directory in oXygen via Preferences-->Templates/Document Templates. This will allow authors who have been using our templates to still access them via "New.../From template" on menu bar
You have various options to add the file templates to Oxygen.
In OXYGEN_INSTALL_DIR/frameworks/dita/templates we provide our own DITA templates. You can replace those if you like with your own or add new templates in the OXYGEN_INSTALL_DIR/templates directory or do as you said above by specifying an additional templates directory path.
johnnsb wrote: I think this all seems sound. Then the last question is (reforming it to see if it makes sense) really whether or not if I WANTED to keep the prolog information I have in these templates, is there any method of integration (or custom work or some API) that would allow me to access the attributes in the prolog when an author is working in a topic so that they can select elements like "SUN" or "LINUX" for a platform attribute.
You can customize many things for the Author like the actions which are available. We provide an Author API through which you can interract programatically with the opened document internal structure.

See this link:
http://www.oxygenxml.com/doc/ug-oxygen/ ... guide.html

However, the choices of values proposed when editing attributes come directly from the DITA DTD and cannot be customized.

But I think that by using the Author API you can make your own action (and add it to the toolbar, menu) which, when applied on the current element could set the 'platform' to a certain value depending on the prolog.
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply