Easily add XML processing instsructions?

Post here questions and problems related to editing and publishing DITA content.
davenz
Posts: 26
Joined: Mon Mar 11, 2019 11:53 am

Easily add XML processing instsructions?

Post by davenz »

Hi folks,

I have a authoring team that frequently enters XML processing instructions into DITA topics for a certain other system that we use. Entering these instructions is manual and usually involves copy/paste.

What I'd like to do is show these processing instructions in the content completion window in Oxygen XML Editor (or Author), so that the team can easily select them. (Or if not the content completion window, some other part of the Oxygen UI that makes it easy to select the instructions.)

What is the best approach for this? We already use a customized cc_config.xml file to make it easy to add keywords and metadata; is the configuration file also the best method for adding processing instructions?

Thanks,
Dave
davenz
Posts: 26
Joined: Mon Mar 11, 2019 11:53 am

Re: Easily add XML processing instsructions?

Post by davenz »

Well, looks like code templates are the way to go :)
https://www.oxygenxml.com/doc/versions/ ... lates.html
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Easily add XML processing instsructions?

Post by chrispitude »

Hi Dave,

Thanks for sharing the answer you found! I did not know about code templates. That's a cool feature. :)
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Easily add XML processing instsructions?

Post by Radu »

Hi,
Code templates have the advantage that once defined they work both in the Text and Author editing modes.
The disadvantages include the fact that they cannot be packed as a framework configuration and that they are only available in the content completion window, they cannot be mounted on the toolbars, contextual and main menus.
An alternative to code templates which works only in the Author visual editing mode is to create custom Author actions and add them to the content completion window (or to other places like toolbar, menus):
https://blog.oxygenxml.com/topics/custo ... etion.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply