The content of this chapter is aimed at people who support eAIP Editors in producing eAIPs in XML format and converting it to HTML (and possibly PDF) format.
If the eAIP is edited in XML, it will be transformed into other formats using eXtensible Stylesheet Language Transformations (XSLT):
for on-screen display, it will be transformed into Hyper-Text Mark-up Language (HTML);
for a paper copy, it is transformed into eXtensible Stylesheet Language Formatting Objects (XSL-FO). Software tools must be used to print XSL-FO. Currently, the most convenient method is to first convert XSL-FO to PDF or PostScript and then print those files.
Charts and graphics can be made available in various formats, and an effective one for aeronautical charts is Scalable Vector Graphics (SVG). All these technologies are official recommendations (standards) published by the W3C (World Wide Web Consortium).
XML stands for eXtensible Markup Language. XML is a subset of the Standard Generalized Markup Language (SGML, ISO 8879). Since 1998, when it was published as a recommendation by the W3C, XML has rapidly become the de-facto industry standard for electronic data interchange.
XML is a meta-language (a language to define other languages). It allows us to define an "AIP language" for computers. Using the EUROCONTROL eAIP language, people and computers can talk to each other using the same vocabulary and grammar.
XML was selected because it fulfils the eAIP's main objective: it is commonly used for structuring documents and it is suitable for both human-to-computer and computer-to-computer interaction. Also, since 1998 it has been a recognised standard, widely adopted by the software developers in many industries.
To a certain extent, the XML eAIP can be used for computer-to-computer data exchange. However, it does not offer the same capabilities for structured aeronautical data exchange as the Aeronautical Information Exchange Model (AIXM). The essential difference between the two is that AIXM models the aeronautical information, while the XML eAIP models the AIP document. AIXM is primarily intended for computer-to-computer aeronautical data exchange. The XML eAIP is primarily intended to provide the AIP content for publication in various formats and on various media, according to users' needs.
DTD stands for Document Type Definition. It is a formal representation of XML documents' structure. To follow our previous analogy with languages, the eAIP DTD is a formal definition of the eAIP language's vocabulary and grammar.
XSLT stands for eXtensible Stylesheet Language Transformations. It is an XML-based language that allows the transformation of an XML document into another XML document (or into text document as well). In the eAIP context, XSLT is used to convert eAIP files from XML into HTML format or XSL-FO format.
XSL-FO stands for eXtensible Stylesheet Language Formatting Objects. It is an XML-based language that allows the expression of a document with its formatting, for example, in order to print it on paper. In the eAIP context, XSL-FO is used to format an eAIP in order to print it on paper. With adequate software, it will be possible in the future to directly print an XSL-FO document. In the meantime, it is possible to use software that converts XSL-FO to PDF or PostScript and then print those files.
SVG stands for Scalable Vector Graphics. It is an XML-based language to express 2-dimensional drawings using simple graphical objects such as lines, circles, rectangles and text, and object properties such as color, size and position. As it is written in XML, SVG charts can quite easily be linked to other XML information.
It is possible to zoom into a small portion of an SVG image and still see a very precise definition of the image. In fact, SVG image resolution is only limited by printers' resolution: graphical objects in an SVG image are defined using "vectors" (lines, curves, circles, rectangles). The shapes are re-drawn each time the user changes the zoom level, so that when zooming in on a circle, it will always be drawn as a "perfect" circle. That is, as perfect as the screen or printer is able to draw. On the other hand, with a raster (bitmap) graphic, when you zoom in on a circle, a pixelised polygon will eventually be seen.
SVG images can be interactive; for example, it is possible to highlight a single route on a route map or click on an object on a map to obtain additional information about this object.
The eAIP Core and Extended Toolbox software, including the DTD, the source code and documentation is provided under a specific Open Source license. Please read the file LICENSE.txt in the eAIP Core Toolbox, or the License in this document, for more details. More information on Open Source Software licensing may be found at the Open Source Initiative organisation.
|
This software is OSI Certified Open Source Software. OSI Certified is a certification mark of the Open Source Initiative. |
The eXtensible HyperText Markup Language (XHTML) is used in the eAIP DTD. XHTML has the same expressive capabilities as HTML but has a stricter syntax and is XML-based.
Please read the file LICENSE.txt in the eAIP, or the License section in this document, for more details about XHTML licensing.
The full eAIP package is bundled with the following Open Source Software:
SAXON XSLT Processor by Michael Kay
Schematron 1.5 tools by David Carlisle and Rick Jelliffe (modified for the eAIP)
Xerces XML Parser by the Apache Software Foundation
XHTML Modularization by the World Wide Web Consortium
OpenSSL by The OpenSSL Project
GPG by the Free Software Foundation
They are re-distributed with permission, following their respective license. Please read the file LICENSE.txt in the eAIP, or the license in this document, for more details.
Open a terminal or command prompt window (e.g., "MS-DOS");
Change the current directory to where you unzipped the eAIP (for
example on Windows, type cd
C:\path\to\eAIP-pack
);
Transform the eAIP file into HTML using MakeAIP-core.bat (read the MakeAIP-core documentation first) Usage examples:
simply type "makeaip-core" to display usage information;
type "makeaip-core sections -f html" to generate all HTML files for the sections;
type "makeaip-core GEN-0.1 -f html" to generate only the HTML file for the GEN-0.1 section;
type "makeaip-core AD-2.EADD -f html" to generate only the HTML file for the EADD aerodrome;
type "makeaip-core menu" to generate the navigation menu (ToC window).
Delete any section file in HTML which is "NIL", unless it becomes NIL in this amendment.
Instead of makeaip-core.bat (which only runs on Windows), you can use your favourite XSLT processor directly.
The XSLT processing takes about 10 seconds per file, using a Pentium III processor at 866MHz with 128MB RAM. However, the time taken can vary depending on the size of the files being processed.
The XSLT stylesheets that produce HTML and XSL-FO are (almost) language- and locale-independent ("internationalised"). When they need to generate static text, such as en-route tables headings, they use a separate file, which contains translations (localisations) of (almost) all static content. For the EUROCONTROL's eAIP Specimen, this file is named "EC-locales-en-GB.xml".
The locales file is part of an eAIP: the eAIP is not usable without its locales file. It shall always be located in the same directory as the XML eAIP file, and be named "-locales.xml", prefixed with the International Civil Aviation Organisation (ICAO) country code.
The eAIP DTD can be found in the eAIP Editor's Manual.
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 provide information to translators.
When a stylesheet generates 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 the specification of content that may be placed 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 correct id and, within it, for a translation element with the correct language tag, as explained above.
The eAIP menu may be customised to offer links to other language version. If no other language version exists, then the relevant lines in the file xslt/html-content.xslt shall be removed.
The links to other language versions are simple to develop: depending on the file structure, other filenames may be created by simply changing the language suffix. There is currently no way of determining automatically the other languages available for a given eAIP.
An XSLT processor is required. However, as most software of this type is developed in Java, a Java Runtime Environment (JRE) may also be needed. Optionally, MakeAIP-core.bat may be configured.
An XSLT processor transforms XML files into other formats, such as HTML and XSL-FO, using XSLT instructions.
Popular XSLT processors include:
There are many other processors available. MSXML uses a particular implementation of namespaces making it more appropriate for XML experts. Note that MSXML only runs on Windows platforms, while Xalan and Saxon run on any Java 2 platform (Windows, Unix, Mac and others).
If you are using MSXML, check which version is to be used and specify this in the MakeAIP-core file (read MakeAIP-core.html). This allows any version of MSXML that you have installed to be used, 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 Core Toolbox, only works with Xalan. It is anticipated that it would be easy to adapt it to Saxon, however. MSXML is incompatible with "eAIP Splitter".
The MakeAIP-core.bat batch file provided in the eAIP Core Toolbox shall be configured before first use. It shall be necessary to identify the location of the XSLT software. Please read MakeAIP-core documentation for more information.
These guidelines may be followed in order to install all the software needed for the eAIP. If these guidelines are followed the result will be a working eAIP production system based on MakeAIP-core.
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 experts in this field. However, it only needs to be done once (unless upgrading).
It is recommended that the IBM Java Runtime Environment (JRE) version 1.3.x or above is installed. Other JREs should also work but these guidelines may need to be adapted.
Check if JRE is already
installed: open a terminal or command prompt window
("MS-DOS") and type java -version
and then
enter. If Java is correctly installed, the version number (for
example: 1.3.0) should be displayed as well as some other
information, including the provider (for example, IBM). It is
recommended that If you do not have version 1.3.0 that you upgrade
unless you are an expert in this field. If you do have JRE already
installed, you can skip this section and go to the Xalan
section;
Download: browse to http://www.ibm.com/java/jdk; register on the website (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 following the instructions on the site);
Install: carefully follow the instructions provided on the JRE download page; the installation itself is simple and requires little interaction;
Update your PATH: Add the java directory to your PATH environment variable: the way to do this depends on the platform you are working on and so you should refer to the installation instructions (they are located in the "docs" directory, where the JRE was installed).
Download: browse to http://xml.apache.org/xalan-j/index.html. Under the title "How do I get it?", further down the page, download the binary distribution;
Install: create a directory named "c:\dev" (on Unix, name it "~/dev") and unzip the package into this new directory. You may select another directory but make sure there is no space in the path;
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
(for Unix, this path will need to be amended appropriately).
CLASSPATH is like the PATH environment variable but is reserved for
Java. This variable may be set in the same way as PATH above.
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 is not sufficient).
Download: browse to http://xmlgraphics.apache.org/fop/ and click on "Download" in the menu. Click on "distribution directory". Download the latest version (currently, Fop-0.20.5-bin.tar.gz);
Install: Unzip the package, for example in "c:\dev\fop";
Read the documentation for MakeAIP-core.bat from our eAIP Core Toolbox to configure MakeAIP-core.bat for your environment.