oXygen SDK

Beginning with version 16.0 oXygen makes its SDK available as a set of Maven artifacts. An archetype is provided that can be used as a base to develop oXygen frameworks, plugins, and Eclipse plugins integration. It can be also used to create projects that use the Author Component. For each specific task you can find more details in the sections that follow. In case your build system is not based on Maven, you can find a link to a zip package with all the JAR files in the oXygen SDK.

The latest API changes that were introduced by the current version of oXygen are available here.

Author Framework Development

The Author frameworks are bundles containing CSS, schema files, and Java code and allow powerful customization of your XML document types in the oXygen Author mode.

Author Framework Development

If you want to enhance and tune the default editing capabilities, you will need to develop Author framework Java extensions. For details and step-by-step tutorials, please read the Author Developer Guide.

Author Developer Guide

Setting up the oXygen SDK is a good starting point. Once setup, this sample project includes an oxygen-sample-framework Maven module which contains:

  • A sample framework project, implementing the Simple Documentation Framework described in the oXygen User Guide
  • The Author API, as attached Javadoc documentation (The Javadoc of the oXygen SDK API is also available online)
  • The source code of all the Java operations present in the DITA, DocBook, TEI, and XHTML oXygen frameworks
  • A README.html file describing the necessary steps for building and packaging

Plugins for the Standalone Distribution

Plugins for the Standalone Distribution

Once you setup the oXygen SDK sample project, you can implement your plugin starting from one of the samples provided in the oxygen-sample-plugins module. This module contains the source code of several sample plugins implemented as Maven projects and the Javadoc API of the plugins support in the oXygen standalone distribution.

Resources:

The following sample plugins are included in the oxygen-sample-plugins module. They can also be installed through the add-ons support, being available as add-ons, deployed at http://www.oxygenxml.com/InstData/Addons/optional/updateSite.xml.

Workspace AccessThis plugin provides support for customizing the content of the menus, toolbars, and views of the application and for opening and closing documents. You can manage and perform different operations on all the opened editors. It can be used to access the Author and Text mode documents, being a bridge between plugins and the Author API.
Components ValidatorThis plugin allows you to filter the editor's menus, toolbars, and other user interface components.
Impose OptionsThis sample plugin imposes fixed options, loaded from an exported XML options file, to . It can also impose a fixed layout and a new file templates folder.
Custom ProtocolThis plugin provides a Java URL stream handler for a custom protocol able to handle URLs of the form cproto://path/to/file.ext, where cproto is the protocol handled by the plugin.
Open RedirectThis plugin is useful for opening multiple files with only one open action. For example, when a zip archive, an ODF file, or an OOXML file is opened in the Archive Browser view the plugin can also decide to open a file from the archive in a new XML editor panel. This file can be the document.xml main file from an OOXML file archive.
Capitalize linesThis plugin capitalizes the first letter found on every new line that is selected. Only the first letter is affected, the rest of the line remains the same. If the first character on the new line is not a letter then no changes are made.

To build and package the plugins follow the instructions in each of the sample plugin README.html files. To create a zip archive containing all the plugins use the bundle-plugins module.

Standalone/Applet Integration

The oXygen SDK can be used to integrate the visual oXygenAuthor mode in your own Java Swing applications. One common use case is to embed the Author component as a Java Applet in a Web application (as part of a CMS front end).

Standalone/Applet Integration

For an online demo applet click here.

You can read more about the Author Component in the Author Component Developer Guide. The API starting point is the AuthorComponentFactory.

CMS Oxygen Component

The oXygen SDK project module oxygen-sample-applet contains a sample Author Component integration as a Java Applet. This module depends on several other modules:

  • bundle-options which specifies the oXygen options to be used by the applet
  • bundle-plugins which specifies the oXygen plugins to be installed in the applet. The pom.xml file holds the plugin dependencies. You can comment out the dependencies you do not want to be included in the applet
  • bundle-frameworks which contains the frameworks that the applet will use

To build and package the applet together with all its dependencies, follow the steps described in the README.html file from this project.

oXygen XML Author WebApp Integration

oXygen XML Editor can be deployed server side, allowing a variety of HTML5 enabled client devices to edit and review XML content.

WebApp Integration

The oXygen WebApp can be used as a CMS front-end and requires customization for accessing the XML documents.

  1. You should begin by setting up the oXygen SDK.
  2. To run the oXygen WebApp server and access it from the browser (desktop or mobile), follow these steps.
  3. An easier way to test an Author Framework customization for the oXygen WebApp, is to install the oXygen WebApp Add-On. This add-on is designed for testing only and is not meant for a real-world deployment. It is a development tool that simplifies the testing of oXygen customizations (Author Frameworks).

  4. In case you need to change options, supported XML document types, or install plugins for accessing resources read how to customize the oXygen WebApp. Read more about this topic in the oXygen WebApp manual.

Eclipse IDE Integration

This additional API is provided for easily accessing the files opened in the oXygen XML editor Eclipse plugin from your own Eclipse plugins. You can check which pages are active in the open XML editors, modify them, or add listeners to notify custom views which can provide additional context information. For instance, it is possible to access the document model from the Author mode directly from your plugin, using most of the Author API.

The oXygen SDK contains the oxygen-sample-eclipse-plugin module (a complete sample Eclipse plugin that extends the oXygen XML Editor Plugin for Eclipse).

To build and package the Eclipse plugin follow the steps described in the README.html file from the project directory.

XProc API

oXygen offers a public API that can be used to implement support for an XProc engine that can be used from oXygen to execute and also possibly validate XProc pipelines. The development procedure is described in the user manual (please see the Integration of an external XProc engine - the XProc API section).

API History

The API distributions listed in this page are compatible with the oXygen version 17.0. If you are developing for older oXygen versions you may consider using the corresponding API version: