How to manage a new DITA-OT plugin with a new media type

Managing a new plugin for a new media-type needs parameterizations both on the Componize server to declare the media-type and on the DITA-OT Server for deploying the plugin.

  1. Use the default XProc pipeline (dita-ot.xpl) or create a new one if you need more action and parameterization before and/or after the DITA-OT process is run.
  2. Create the media-type:
    For example to create a Word output, the bean is:
      <bean id="my.ooxml.mediaType" parent="io.mediaType.factory.abstract">
        <property name="name" value="application/vnd.openxmlformats-officedocument.wordprocessingml" />
        <property name="label" value="Microsoft Word (OpenXML)" />
      </bean>
  3. Create a new Spring Pipeline Definition bean to define your transtype:
      <bean id="my.ditaot.docx.pipelineDefinition" parent="ditaot.pipelineDefinition.abstract">
        <property name="resultMediaType" ref="my.ooxml.mediaType" />
        <property name="options">
          <map>
            <entry key="transtype" value="docx" />
          </map>
        </property>
      </bean>
  4. Create a new Spring Alfresco Pipeline Definition bean:
      <bean id="my.alfrescoPipelineDefinition.ditaot.docx" parent="alfresco.pipeline.definition.abstract">
        <property name="id" value="my.ditaot-docx" />
        <property name="pipelineDefinition" ref="my.ditaot.docx.pipelineDefinition" />
      </bean>
    
  5. Define the title and description of your pipeline in a property file:
    my.ditaot-docx.title=DOCX
    my.ditaot-docx.description=DOCX
    

    Note: You will also be able to provide or override the title and description of your pipeline by setting properties on the XML Pipeline Configuration file itself, using Alfresco Share Interface.

  6. Create a pipeline configuration file in Alfresco that uses your new pipeline:
    <?xml version="1.0" encoding="UTF-8"?>
    <pipelineConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:noNamespaceSchemaLocation="cpnz:pipeline:xsd:pipeline-configuration.xsd">
      <pipeline>my.ditaot-docx</pipeline>
      <options>
        ...
      </options>
      <catalogs> 
        ...
      </catalogs> 
    </pipelineConfiguration>