Use Case: plugin architecture for DITA-OT

Use Case for developer

1. Brief Description

This use case describes how a Developer create new plugins for DITA open toolkit.

2. Preconditions

  1. User read the document of dita-ot.
  2. User setup required software on local machine.
  3. User installed DITA OT tool to local.

3. Basic Flow

  1. Developer creates a new directory in /demo for this plugin. For example, /plugin/pluginA. Under this plugin root directory, there will the following sub directories demo/ pluginA/ dtd schema catalog xsl lib
  2. Developer specializes from topic or other types of topic (like task, reference, concept .....) and put the dtd files into dtd directory schema files into schema directory
  3. Developer puts the catalog information into his own catalog file in catalog directory and inherit the original information from catalog-dita.xml in the root directory.
  4. Developer defines the transformation for the new specialization and put them to xsl directory.
  5. Developer provides the Ant script to use his xsl file with preprocess with default ant script template into plugin root directory
  6. Developer puts compiled JAR files which is necessary for this plugin into lib directory.
  7. Developer packages all the subdirectories and files under pluginA to a zip binary file and thus create a DITA OT plugin file for distribution.
  8. Developer tests the plugin file will run successfully when integrated into DITA OT base.
  9. Developer finishes testing.
  10. The basic flow is complete.

Use Case for end user

1. Brief Description

This use case describes how an end user get, install and use a plugin developed for DITA open toolkit There are 2 options for the plugin architecture to load the plugins. One is just like eclipse plugin architecture. We load the plugins every time a build is invoked. The other one is like mozilla firefox. Every time when we installed new plugin, we should start a program to install those plugin and integrate them with toolkit. Currently we decided to use the first option.

2. Preconditions

None

3. Basic Flow

  1. User goes to the DITA OT SourceForge website to download the DITA OT base binary file
  2. User goes to the DITA OT SourceForge website (or other website) to download a DITA OT plugin binary file. e.g. DITA OT plugin A
  3. User installs DITA OT to the his/her local computer by following the installation instruction. The installed directory is <DITA OT root directory>
  4. User configs DITA OT and can run DITA OT basic functions successfully.
  5. User extract the plugin A package to <DITA OT root directory>/plugin or <DITA OT root directory>/demo
    1. User uses Ant to call the new function provided by plugin A.
    2. Use uses Java command line to call the new function provided by plugin A.
  6. User runs the plugin A function successfully.
  7. The basic flow is complete.

4. Alternative Flows

#1 install plugin (option 1) The plugin is integrated to toolkit dynamically by integrator every time a build is invoked. User just need to unzip the package to the specific directory and it's not necessary to do anything else.

#2 remove plugin (option 1) User remove the directory containing the plugin files and doesn't need to do anything else.