Customizing Author Operations
Oxygen XML Author
Author mode has a built-in set of operations covering the insertion of
text and XML fragments (see the Author Default
Operations) and the execution of XPath expressions on the current document edited in
Author mode. However, there are situations where you need to extend
this set. The following examples are just a few of the possible situations:
- You need to enter an element whose attributes will be edited by the user through a graphical user interface.
- The user must send selected element content (or the whole document) to a+ server for some kind of processing.
- Content authors need to extract pieces of information from a server and insert it directly into the edited XML document.
- You need to apply an XPath expression on the current document and process the nodes of the resulting node set.
To extend the Oxygen XML Author Author mode functionality through Java, you will need the Oxygen SDK available on the Oxygen XML Author website. It includes the source code of the Author mode operations in the built-in document types and the full documentation (in Javadoc format) of the public API available for Author mode custom actions.
The subsequent Java examples make use of AWT classes. If you are developing extensions for the Oxygen XML Author XML Editor plugin for Eclipse, you will have to use their SWT counterparts.
Attention: Make sure the Java classes of your custom
Author mode operations are compiled with the same Java version used
by Oxygen XML Author. Otherwise, the classes may not be loaded by the Java virtual
machine. For example, if you run a version of Oxygen XML Author with a Java 11 virtual
machine but the Java classes of your custom Author mode operations are
compiled with a Java 12 or later virtual machine, then the custom operations cannot be loaded
and used by the Java 11 virtual machine.
Important: From a legal standpoint, you can freely develop and share extensions using
the Oxygen SDK ONLY if you have a legal, active license to use Oxygen XML Author
and ONLY if such extensions are used from inside Oxygen XML Author. To use such
extensions outside of Oxygen XML Author (for example, a 3rd-party application that has
Oxygen XML Author built in to it), an additional license must be purchased to use the
SDK according the Oxygen XML SDK Licensing Policy .