Documentation of the customisation of the WebHelp toolchain

From OpenPetra Wiki
Jump to navigation Jump to search

Reason for WebHelp Customisations

ChristianK applied quite a few customisations to the Docbook 'WebHelp' toolchain to achieve the HTML output we prefer for the upcoming OpenPetra Application Help (cf. Application Help Content Management and Delivery). This wiki page documents the DocBook WebHelp toolchain and the customisations ChristianK applied.

Toolchain Components

DocBook XLS-NS (WebHelp)

Initially, ChristianK used the latest official release of the DocBook XLS-NS files, 1.76.1, for the production of the WebHelp output. ChristianK couldn't achieve several things with this version and contacted the authors of WebHelp for advice. They provided many useful tips, but also made interim builds of DocBook WebHelp to cater for the things we wanted to achieve. Thus, ChristianK used interim builds of DocBook WebHelp for the latest results of our application help demo. The last interim build ChristianK used was Rev. r9195 (by dcramer, 2012-01-14 22:21:17 +0000 [Sat, 14 Jan 2012]). The interim builds can be downloaded from here: http://50.56.245.89/

Apache Ant

WebHelp depends on Apache Ant. The version ChristianK used was 1.8.0. There were newer versions out at that time (1.8.1 and 1.8.2), but those didn't include some libraries anymore on which WebHelp depends, so ChristianK used 1.8.0, which still contains those libaries. WebHelp might be able to deal with a newer version of Ant in an upcoming version.

Saxon

WebHelp depends on Saxon. The version ChristianK used was 6.5.5, which is the version that is recommeded in the WebHelp documentation.

Customisation Setup

On our development server 'jonah' the following directory exists:

C:\OpenPetra_SingleSourcePublishing\WebHelp processing stack (separate of Calenco!)\CURRENT\webhelp

In this directory the extracted contents of Rev. r9195 of DocBook XML-NS can be found. Under the directory 'webhelp' ChristianK created a directory called 'OpenPetra' in which the custom batch scripts are found, as well as a custom build.xml file. ChristianK also created the directory 'docsrc' under the 'OpenPetra' directory. It contains the input DocBook files that are processed by our installation of WebHelp ('userguides.xml' and 'tutorial.xml').

Custom Batch Scripts

configure.bat

Sets CLASSPATH and ANT_HOME and appends the Apache bin directory to the PATH.

One needs to run this script once from a command shell window to configure the WebHelp toolchain on jonah.

create-webhelp-OpenPetra.bat / create-webhelp-Tutorial-OpenPetra.bat

Invoke the creation of WebHelp, specifying the input and output directories.

  • create-webhelp-OpenPetra.bat creates the application help.
    • It works with the input file 'userguides.xml' and stores the generated HTML files in the 'output-userguides' subdirectory.
  • create-webhelp-Tutorial-OpenPetra.bat creates the tutorial.
    • It works with the input file 'tutorial.xml' and stores the generated HTML files in the 'output-tutorial' subdirectory.

One can run those batch scripts as often as one wants to create WebHelp output from the input files. One has to do this in the same command shell in which configure.bat was run so WebHelp is configured properly!

Custom build.xml Files

In webhelp Folder

The line in the build.xml file where it says

style="../profiling/profile.xsl">

needs to be changed to

style="../../profiling/profile.xsl">

to allow the running of WebHelp from the 'OpenPetra' subfolder.

In 'OpenPetra' Subfolder

Content of the custom build.xml file, which resides in C:\OpenPetra_SingleSourcePublishing\WebHelp processing stack (separate of Calenco!)\CURRENT\webhelp\OpenPetra\:

<project>
  <import file="../build.xml"/>
</project>

This file doesn't add any customisation, but it must be in place for Ant to work.

build.properties Customisations

The lines in the build.properties file where it says

branding=docbook
brandname=DocBook

need to be changed to

branding=openpetra
brandname=OpenPetra

The line in the build.properties file where it says

admon.graphics=0

needs to be changed to

admon.graphics=1

to turn on the showing of icons in the 'Warning', 'Info', etc. sections of the application help (Example where they are shown: 'To Add, Edit or Delete a Currency' topic in 'Finance Module Set-up').

XSL File Customisations

CSS Customisations