Java API - Extending Author Functionality through Java

Oxygen XML Author 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 in which you need to extend this set. For instance if you need to enter an element whose attributes should be edited by the user through a graphical user interface. Or the users must send the selected element content or even the whole document to a server, for some kind of processing or the content authors must extract pieces of information from a server and insert it directly into the edited XML document. Or you need to apply an XPath expression on the current Author document and process the nodes of the result nodeset.

The following sections contain the Java programming interface (API) available to the developers. You will need the Oxygen Author SDK available on the Oxygen XML Editor plugin website which includes the source code of the Author operations in the predefined document types and the full documentation in Javadoc format of the public API available for the developer of Author custom actions.

The next Java examples are making use of AWT classes. If you are developing extensions for the Oxygen XML Editor plugin XML Editor plugin for Eclipse you will have to use their SWT counterparts.

It is assumed you already read the Configuring Actions, Menus, Toolbar section and you are familiar with the Oxygen XML Editor plugin Author customization. You can find the XML schema, CSS and XML sample in the Example Files Listings.

Attention:

Make sure the Java classes of your custom Author operations are compiled with the same Java version used by Oxygen XML Editor plugin . Otherwise the classes may not be loaded by the Java virtual machine. For example if you run with a Java 1.6 virtual machine but the Java classes of your custom Author operations are compiled with a Java 1.7 virtual machine then the custom operations cannot be loaded and used by the Java 1.6 virtual machine.