Chapter 2. eAIP Publication Process

Introduction

The content of this chapter is aimed at people who support eAIP Editors in producing eAIPs in HTML, XSL-FO and PDF formats. The publication process contained in the eAIP Specification is a good introduction to this document.

Production of HTML, XSL-FO and PDF formats

  1. Open a terminal or command prompt window ("MS-DOS")

  2. Change the current directory to where you unzipped the eAIP package (for example on Windows, type cd C:\path\to\eAIP-pack)

  3. Transform the eAIP file into HTML using MakeAIP.bat (read the MakeAIP User Manual first) Usage examples:

    • simply type "makeaip" to display usage information

    • type "makeaip sections -f html" to generate all HTML files for the sections

    • type "makeaip GEN-0.1 -f html" to generate only the HTML file for the GEN-0.1 section

    • type "makeaip AD-2.EADD -f html" to generate only the HTML file for the EADD aerodrome

    • type "makeaip menu" to generate the navigation menu (ToC window)

  4. Transform the eAIP file into XSL-FO by using the same commands as above, but replacing "-f html" by "-f fo"

  5. Transform XSL-FO files to XEP's AT (Area Tree) by using the same commands as above, but replacing "-f html" by "-f at".

  6. Transform AT files to PDF by using the same commands as above, but replacing "-f html" by "-f pdf".

  7. Delete any section file in HTML which is "NIL", unless it becomes NIL in this amendment

  8. Delete any section file in PDF which is "NIL" or becomes NIL in this amendment

Instead of makeaip.bat (which only runs on Windows), you can use your favourite XSLT processor and XSL-FO renderer directly.

The XSLT processing takes about 10 seconds per file, using a Pentium III processor at 866MHz with 128MB RAM.

How do I get a paper version of my eAIP?

  1. Generate the PDF files

  2. Print them.

MakeAIP does not contain any batch script to automate this yet.

Special procedure for GEN 0.4 (checklist of pages) in PDF format

GEN-0.4 needs AT files (XEP's Area Tree format) for all sections in order to be generated, including for itself. This creates an interesting chicken-and-egg issue: AT format are produced using FO format, but GEN-0.4.fo needs GEN-0.4.at. To solve it, we have a special procedure for section GEN-0.4:

  1. Generate all sections in AT format (this will produce an empty GEN-0.4):

    1. makeaip sections -f fo

    2. makeaip sections -f at

  2. Generate a better version of GEN-0.4 in AT format using MakeAIP's checklist command. Note that the checklist will include pages from the empty GEN-0.4 file.

    1. makeaip checklist -f fo -s URI

    2. makeaip GEN-0.4 -f at

    In this example, the URI would be "../at", because "at" is the default directory where AT files are built and the URI is relative to the default "fo" directory where FO files are built.

  3. Generate GEN-0.4 AT format again, in the same way. This time, it will include the better GEN-0.4 pages, but the number of pages of GEN-0.4 may have changed (because the number of listed pages of GEN-0.4 may have increased, pushing other listed pages and eventually creating a new page for GEN-0.4). If so, you must generate GEN-0.4 once again, and check once again if the number of pages of GEN-0.4 has changed (at this time, it is very unlikely).

  4. Finally, you can generate the PDF format: makeaip GEN-0.4 -f pdf

  5. Repeat all this for each language of your eAIP.

For a concrete example, please read the Amendment Procedures, section "Paper eAIP".

Special procedure for "0.6" sections (tables of contents) in PDF format

Note

MakeAIP does not contain a complete tool to automate this procedure; it might be possible to provide it in future.

To have a correct table of contents in the 0.6 sections, a whole eAIP Part must be generated in a single FO and then AT file. Then, the AT format is used to move correct 0.6 pages from the whole Part file to the 0.6 section file. Only after that can we build the PDF format.

  1. makeaip GEN -f fo

  2. makeaip GEN -f at

  3. Open the GEN Part AT file (preferably with an XML editor); locate the pages (xep:page elements) of section 0.6 (hint: count how many pages the previous sections are made of, using their AT or PDF format) and copy them into the GEN-0.6 section file, replacing existing pages

  4. makeaip GEN-0.6 -f pdf

  5. Repeat for ENR and AD

Internationalisation and Localisation

Locales file structure

The locales file is written in a simple XML format. Each translated item is represented by a text element with a unique id attribute. A text element contains at least one translation element, which contains the actual text of the translation. The translation element has an xml:lang attribute, which indicates the language tag of the translation. A text element may contain an optional note element to give information to translators.

Implementation of Internationalisation

When a style sheet must generate static text, it calls the "gettext" template, which is defined in xslt/g-gettext.xslt. This template takes a mandatory parameter "ID", containing the id of the text element to be output. An optional "c1" parameter allows to specify content that might be put at a different place in a translation item, depending on the language.

The "gettext" template looks in the locales file for a text element with the right id and, within it, for a translation element with the right language tag, as explained above.

Customising the eAIP menu

The eAIP menu should be customised to offer links to other language version. If no other language version exist, then the relevant lines in the file xslt/html-content.xslt can simply be removed.

The links to other language versions are quite easy to devise: depending on your files organisation, you can build the other file names by simply changing the language suffix. There is not (yet) any way to find out automatically what other languages are available for a given eAIP.

Software Requirements

Basically, all you need is an XSLT processor and an XSL-FO renderer. However, most of such software are developed in Java, so you will probably also need a Java Runtime Environment. Optionally, you may want to configure MakeAIP.bat.

XSLT processor

An XSLT processor is a software that transforms XML files into other formats, such as HTML and XSL-FO, using XSLT instructions. For more information about XSLT, see the references section of the eAIP Specification.

Famous XSLT processors include:

  • Saxon, an Open Source Software written in Java, by Michael Key (recommended);

  • Xalan, another Open Source Software written in Java by the Apache Software Foundation;

  • MSXML, a closed source implementation by Microsoft, available free of charge as well.

There are many other processors available. Because of MSXML's particular implementation of namespaces, we do NOT recommend it, unless you are an XML expert and you know what you are doing. Note that MSXML only runs on Windows platforms, while Xalan runs on any Java 2 platform (Windows, Unix, Mac and others).

If you are using MSXML, check what version you want to use and specify this in the MakeAIP file (read MakeAIP.html). This allows you to use any version of MSXML that you have installed, even in "side-by-side mode". Please note that Internet Explorer will only use the version that is in "replace mode". See http://www.netcrucible.com/xslt/msxml-faq.htm for more details.

The "eAIP Splitter", one of the tools provided in the eAIP package, only works with Xalan. It would be easy to adapt it to Saxon, though. It looks as not being possible to make it work with MSXML (as of version 4).

XSL-FO renderer

An XSL-FO renderer is a software that transforms XSL-FO files into other formats, such as PDF (Portable Document Format, made popular by Adobe) and PostScript. For more information about XSL-FO, see the references section of the eAIP Specification.

Two famous XSL-FO renderers are:

  • XEP, a commercial product from RenderX (recommended).

  • FOP, an Open Source Software written in Java by the Apache Software Foundation, available free of charge;

There are a few other renderers available. Both FOP and XEP run on any Java 2 platform (Windows, Unix, Mac and others). FOP is free but not complete. XEP is (almost) complete but not free. A free evaluation version of XEP is available at their Web site. We recommend XEP because the eAIP needs a couple of specific features that FOP has not implemented yet. It is possible to work around FOP's lacking features, but it requires some development work on the XSLT style sheets to generate XSL-FO.

MakeAIP.bat

If you want to use the MakeAIP.bat batch file provided in the eAIP package, you should configure it first. It needs to know where are the XSLT and XSL-FO software. Please read MakeAIP.bat documentation for more information.

Software installation guidelines

Here are some guidelines you might want to follow in order to install all the software needed for the eAIP. If you don't feel comfortable with software installation in general, you might better call your IT support for help. Otherwise, these guidelines - if carefully followed - should lead you to a working eAIP production system based on MakeAIP.

Please note that these guidelines only deal with Java software. There are other options available. Installing Java and configuring Xalan may seem complex at first glance, even for computer specialists. However, you only need to do it once (except if you want to upgrade it later, of course)

Note

The following guidelines are a little bit outdated now, as they don't consider Sun's JVM version 1.4. If you prefer to use this version, please refer to this FAQ entry on Xalan Web site (even if you don't want to use Xalan): Issues running Xalan-Java on JDK 1.4

Java

We suggest you install the IBM Java Runtime Environment (JRE) version 1.3.x. Other JRE's should work as well, but these guidelines might need to be adapted.

  1. Check if you have it already: open a terminal or command prompt window ("MS-DOS") and type java -version and then enter. If you have Java correctly installed, it should display its version number (for example: 1.3.0) and some other information, including the provider (for example, IBM). If you don't have a version 1.3.0, we recommend upgrading, unless you know what you are doing. If you do have it, you can skip this section and read about Xalan directly.

  2. Download: browse to http://www.ibm.com/java/jdk; register on the Web site (or log in if you are already registered); you will then be presented with a list of packages: click on the JRE 1.3.0 corresponding to your platform (Windows NT, Windows 98, Linux, etc.); you will then see another list: download the installer and the JRE (carefully follow the explanations on the site)

  3. Install: carefully follow the instructions provided on the JRE download page; the installation itself is rather easy and you don't have much input to give.

  4. Update your PATH: Add the java directory to your PATH environment variable: this depends on the platform you are working on, so you should again refer to the installation instructions (they are in the "docs" directory, where you installed the JRE).

Xalan

  1. Download: browse to http://xml.apache.org/xalan-j/index.html. Under the title "How do I get it?", lower in the page, download the binary distribution.

  2. Install: create a directory named "c:\dev" (on Unix, name it "~/dev") and unzip the package into this new directory. You can choose another directory, but make sure there is no space in the path.

  3. Update your CLASSPATH: Add Xalan and its components to your CLASSPATH environment variable (create this variable if needed). Your CLASSPATH should contain: c:\dev\xalan-j_2_4_0\bin\xercesImpl.jar;c:\dev\xalan-j_2_4_0\bin\xml-apis.jar;c:\dev\xalan-j_2_4_0\bin\xalan.jar (under Unix, replace the paths as needed, replace ";" by ":"). CLASSPATH is like the PATH environment variable, but is reserved for Java. You set this variable in the same way as for PATH above.

Note

IBM's JRE comes with an old version of Xerces, which should be removed. Simply delete the file xerces.jar, located in [IBM JRE installation directory]\jre\lib\ext (merely renaming the file will not do it).

FOP

  1. Download: browse to http://xml.apache.org/fop/index.html and click on "Download" in the menu. Click on "distribution directory". Download the latest version (currently, Fop-0.20.4-bin.tar.gz).

  2. Install: Unzip the package, for example in "c:\dev\fop".

  3. Read the documentation of MakeAIP.bat from our eAIP package to configure MakeAIP.bat for your environment.