Page 1 of 1

Easily add XML processing instsructions?

Posted: Sat Sep 09, 2023 3:23 am
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

Re: Easily add XML processing instsructions?

Posted: Sat Sep 09, 2023 3:43 am
by davenz
Well, looks like code templates are the way to go :)
https://www.oxygenxml.com/doc/versions/ ... lates.html

Re: Easily add XML processing instsructions?

Posted: Sat Sep 09, 2023 4:47 pm
by chrispitude
Hi Dave,

Thanks for sharing the answer you found! I did not know about code templates. That's a cool feature. :)

Re: Easily add XML processing instsructions?

Posted: Mon Sep 11, 2023 7:08 am
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