Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Using a custom DITA-OT for publishing | Things to remember

DivrajSingh
Employee
Employee

Background

You are using XML Documentation for Adobe Experience Manager and you publish the DITA content using DITA-OT.

 

Requirement

When using DITA-OT, sometimes you need to use your own version of DITA-OT. The product supplies a specific version of DITA-OT in its release (the latest one when the product version gets released, e.g. version 3.8 of XML Documentation includes DITA-OT version 3.3.2)

There are scenarios in which you may want to customize the DITA-OT supplied with product, those scenarios can be:

  • Using/Adding a custom plugin (to generate a style/branded output or a custom built plugin to get output in desired format, or integrating existing plugins)
  • Using a different version of DITA-OT (may be using the latest version, or using a legacy version on which your plugins were built)

 

Things to Remember when adding such customization

There are few things to keep in mind to make sure the integration of customized DITA-OT works successfully in XML Documentation. These pointers are scenario dependent, which are listed below

Scenario 1: Integrating a new plugin to out-of-the-box DITA-OT

  • The steps are documented in section "Use custom DITA-OT plug-ins" of Installation and Configuration Guide
  • When creating package and uploading it back to AEM server, do make sure you have done following:
Firstly, the zip file you created should have folder named "DITA-OT" in it containing the plugins folder, it is important as system is internally dependent on this, refer screenshot below:
DivrajSingh_0-1620722165864.png


Secondly, when you run the integrator to install custom plugin, recommendation is to do this on a Mac/Linux OS to avoid file separator issues during publishing. The plugin integrated on mac/linux OS is compatible to both Windows and Unix setup

Thirdly, the updated zip file should be of type "nt:file" (this should be the primary type of zip file when uploaded to AEM). To elaborate, do not use this zip file to install as AEM package (using package manager) rather upload this zip to desired path in AEM (e.g. /apps/test/dita_resources/DITA-OT) using a webdav tool or through code deployment

 

Scenario 2: Using a different DITA-OT version than out-of-the-box

Generally this is required because either the implementation team desires to use the latest features in newly released DITA-OT version, or the implementation team already uses another version of DITA-OT that has their custom plugins implemented on, and moving to different version requires refactoring. Hence, in those scenarios the implementation team generally will have their own copy of DITA-OT. Following points should be considered when uploading a custom DITA-OT into the system:

  • The general steps to upload custom DITA-OT are documented in section "Use custom DITA-OT plug-ins" of Installation and Configuration Guide
  • When creating package and uploading it to AEM server, do make sure you have done following:
Firstly, the environment variables within DITA-OT base plugin are updated, as AEM uses a temporary path that is different than what is configured in DITA-OT supplied on open source or use in other systems. So, make sure following environment variables within the DITA-OT are aligned to XML Documentation working paths, e.g. for versions 3.5.1+ of XML Documentation you will have to make following changes to the custom DITA-OT:
DivrajSingh_2-1620723451837.png


You will notice these paths are also printed in the DITA-OT error log, for e.g. following snippet from DITA-OT log prints the values of temporary path that you can validate before changing these variables
DivrajSingh_3-1620724943431.png

Secondly, in DITA-OT version 3.x and above, you may notice that the PDF output generation throws an error like "taskdef class org.dita.index.IndexPreprocessorTask cannot be found using the classloader AntClassLoader[]". This is generally because of the CLASSPATH issues with the custom plugins. To fix this, update the DITA Profile in AEM to add library paths containing the jars "ant-launcher.jar" and "index.jar", refer screenshot below:
DivrajSingh_0-1621362655560.png

Thirdly, update the xerces.jar file as per instructions given in section "Patch Xerces Jar while using custom DITA-OT for publishing" of Best Practices Guide. This is for performance improvement on DITA-OT publishing.

 

 

Some additional references

1 Reply
Kiran_Mohan
Employee
Employee

Hi @DivrajSingh - Can you also share the high level steps to integrate the custom DITA-OT plugin with the product provided DITA-OT on local?

DivrajSingh
Employee
Employee

@Kiran_Mohan : I think what you are asking is documented here. Let me know if you were looking for somethin else.

Vijendra_HS
Employee
Employee

Hi @DivrajSingh, While modifying the out-of-the-box DITA-OT.zip (AEM), there are some permissions (chmod) that need to be changed in order to make it work. Else the plugin will not work upon upload into AEM environments (running linux kernel) 

Can you please document those steps as well?

DivrajSingh
Employee
Employee

Hi @Vijendra_HS 

 

The modified DITA-OT has to be uploaded to AEM repository. Extraction of the DITA-OT is done by AEM process so it should get write permissions for the AEM user (using which AEM java process is running).

Were you trying to upload the custom DITA-OT directly into the AEM extracted path? (/crx-quickstart/profiles/dita-ot...)