1. Why packaging add-ons?

What is described in this chapter applies to all kinds of add-ons: not only customized configurations in XMLmind XML Editor - Configuration and Deployment containing additional commands, stylesheet extensions, validation hooks, custom attribute editors but also plug-ins or extensions of the GUI of XXE.

Packaging an add-on for XMLmind XML Editor integrated add-on manager (menu item OptionsInstall Add-ons in XMLmind XML Editor - Online Help) is not strictly needed. During the development process, it is much quicker to test our extensions by simply copying the relevant files to one of the two addon/ directories scanned by XXE at startup time (more info in Section 1, “Dynamic discovery of add-ons” in XMLmind XML Editor - Configuration and Deployment). Simply do not forget to disable the quick start cache in XMLmind XML Editor - Online Help when you are developing and testing your extensions.

Now you cannot expect the end-user to do the same thing, that's why it is strongly recommended to package add-ons for use by XMLmind XML Editor integrated add-on manager. Fortunately doing so is very easy:

  1. Copy all the files needed by the add-on to a common directory. Example:

    $ mkdir pnm_imagetoolkit-1_0_0
    $ cp pnm_imagetoolkit.jar pnm_imagetoolkit-1_0_0
  2. Add an add-on descriptor to this directory.

    An add-on descriptor is a very simple XML file having a .xxe_addon extension and conforming to the RELAX NG schema contained in the add-on called "A configuration for specifying XMLmind XML Editor add-ons".

    Example of minimal add-on descriptor: pnm_imagetoolkit.xxe_addon:

    <a:addon location="pnm_imagetoolkit.zip"
      <a:category><a:imageToolkitPlugin /></a:category>
      <a:name>PBM, PGM and PPM image toolkit plug-in</a:name>
  3. Zip this common directory (using 7-Zip or Info-Zip for example). Example:

    $ zip -r pnm_imagetoolkit.zip pnm_imagetoolkit-1_0_0

    The common directory must be included in the .zip file. Example:

    $ unzip -v pnm_imagetoolkit.zip
  4. Put the .zip file, along with a copy of your add-on descriptor (pointing to the .zip file as shown in the above example), on a public web site of yours.

    Example: http://www.acme.com/pub/pnm_imagetoolkit.zip and http://www.acme.com/pub/pnm_imagetoolkit.xxe_addon.

  5. Tell your users to drag and drop URL http://www.acme.com/pub/pnm_imagetoolkit.xxe_addon onto the list displayed by XXE Preferences dialog box (OptionsPreferences, Install add-ons section in XMLmind XML Editor - Online Help). This step is done once for all, as user preferences are persistent in XXE.