What is described in this chapter applies to all kinds of add-ons: not only customized configurations in 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 in → ) 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 ). Simply do not forget to disable the quick start cache in 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:
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
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:
<a:addon location="pnm_imagetoolkit.zip" xmlns:a="http://www.xmlmind.com/xmleditor/schema/addon"> <a:category><a:imageToolkitPlugin /></a:category> <a:name>PBM, PGM and PPM image toolkit plug-in</a:name> <a:version>1.0.0</a:version> </a:addon>
$ 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 pnm_imagetoolkit-1_0_0/ pnm_imagetoolkit-1_0_0/pnm_imagetoolkit.jar pnm_imagetoolkit-1_0_0/pnm_imagetoolkit.xxe_addon
.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.
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 (Install add-ons section in → , ). This step is done once for all, as user preferences are persistent in XXE.