MakeAIP-core.bat is a batch script for Windows NT/2000/XP. It eases production of eAIP related files, that is conversion of eAIP in XML format to HTML, XSL-FO and PDF.
MakeAIP-core.bat shall be considered as a proof of concept only. No effort was spent on fine-tuning the tool for better performance. There was no formal validation (software audit) of the HTML and PDF output, to prove that it corresponds entirely with the content of the XML files. The tool should be revisited, improved and validated before being used in a production environment.
This documentation applies to MakeAIP-core.bat version 2.6, revision 1.25, but it is not complete: more parameters are explained in AMDT procedures.
Table 5.1.
MakeAIP-core.bat | Main file, which used for any command |
doc\MakeAIP-core.html | This file: the documentation |
tools\MakeAIP-core\msxsl.bat | Batch file for msxsl.exe |
tools\MakeAIP-core\saxon.bat | Batch file for Saxon |
tools\MakeAIP-core\xalan.bat | Batch file for Xalan |
tools\MakeAIP-core\xt.bat | Batch file for XT |
The file saxon.bat is pre-configured to work with Saxon, provided with the eAIP Core Toolbox.
Open a command prompt window ("MS-DOS");
Change the directory to the one where the eAIP Core Toolbox is installed.
Then simply type makeaip-core.bat to display a summary of usage information, or use one of the sub-commands described below.
Tip: Microsoft offers several "power toys" for their various Windows versions. One of them, called "Command Prompt Here" will prove very useful, as it allows the launch of a command prompt window from File Explorer, directly in a specific directory, by right-clicking on a directory entry. For Windows XP, it is available at http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx.
Throughout this document the following syntax will be used to describe the command-line commands:
command
{ option1 | option2
} {mandatory_parameter
replaceable_value
} [optional_parameter
replaceable_value
] [other_optional_parameter value]
The batch file or executable file to execute.
Alternatives are separated by a vertical bar. Alternatives may be straight values or replaceable values.
Parameters brackets indicate if the parameter is optional or mandatory.
Most parameters take an argument, the styling of which indicates that the word should be replaced by an actual value. The possible values are then explained in the command summary.
Fixed values (for a given command) have a different format. These indicate the actual value that must be typed for the command.
MakeAIP-core.bat accepts several parameters. All parameters are optional and running MakeAIP-core without any parameter outputs a short usage summary.
If any parameter is entered, then the target parameter is mandatory: it indicates the sub-command to run. Depending on the target, other parameters may subsequently become mandatory as well. Here is the command synopsis for general parameters:
makeaip-core
{ sub-command
| section_id
| AIC_or_SUP_name
} [parameters
...]
where:
sub-command is one of the following:
sections: generates all eAIP sections such as GEN-2.2, ENR-3.1 and AD-2.EADD;
menu: generates the eAIP table of contents[1]: see the section called “MakeAIP-core Menu”;[1]
AMDT: generates the list of changes[1]: see the section called “MakeAIP-core AMDT”;
eSUPs: generates the list of AIP Supplements in force[1]: see the section called “MakeAIP-core AMDT”;
eAICs: generates the list of Circulars in force[1]: see the section called “MakeAIP-core AMDT”;
cover: generates the eAIP cover page[1]: see the section called “MakeAIP-core AMDT”;
interface: copies all static files needed by the HTML interface: indexes, frameset definitions, JavaScript, CSS and images;
all: generates all the above, in html format only;
history: generates the list of published eAIPs[1]: see the section called “MakeAIP-core AMDT”;
validator: reports any DTD validation errors and runs MakeAIP-core schematron (see below);
schematron: generates a Schematron report of Additional Rules validation (see the eAIP Editor's Manual);
packmap: generates
the packmap.xml
file.
section_id is a part, chapter or section id such as
GEN-2.2
: see the section called “AIP Section Publication”;
AIC_or_SUP_name is an eAIC or eSUP name such as eSUP-2001-01-01 or eAIC-2001-01-01-C: see the section called “Circulars and Supplements”;
parameters: common parameters are detailed below and each sub-command.
The following parameters are used for several sub-commands:
-d
directoryDirectory where the eAIP XML file is located. The eAIP XML file must be named XX-eAIP-yy-YY.xml, where XX is the country code and yy-YY the language code.
-s
directory
Directory where source (input) files to the sub-command are located.
-t
directory
Directory where target (output) files from the sub-command will be created.
-l
language
Language selection (your eAIP may be in several languages, identified by the suffix to the eAIP XML file, as in EC-eAIP-en-GB.xml).
-c
country
ICAO country code (in case you have several eAIPs from different countries; identified by the prefix to the eAIP XML file, as in EC-eAIP-en.xml).
-p
XSLT_processor
Replace XSLT_processor with one of the following: "saxon", "xalan", "msxsl", "xt" (without the quotes).
-
debugUseful for debugging stylesheets or MakeAIP-core itself, by providing additional output messages.
This is the general process when an editor wishes to generate an AIP section in HTML.
makeaip-core
{
section_id
} [-d eAIP_directory
] [-t target_directory
] [-l language
] [-c country-code
] [-p XSLT_processor
]
Generates a single HTML file for the eAIP element with the given
id. The file will be named
XX-section_id-yy-YY.html
, where XX is the country
code and yy-YY the language code.
The value of the id attribute of an eAIP element. The element must be a part-, chapter- or section-level element, or an Aerodrome or Heliport element.
Example 5.1. MakeAIP-core section_id sub-command for HTML format
Generate one HTML file named
EC-GEN-en-GB.html
for the whole GEN
part:
makeaip-core GEN -d ..\..\Operations\2004-10-28\eAIP -t
..\..\Operations\2004-10-28\html\eAIP
Generate one HTML file named
EB-ENR-3-fr-FR.html
for the whole ENR 3
chapter:
makeaip-core ENR-3 -d ..\..\Operations\2004-10-28\eAIP
-t ..\..\Operations\2004-10-28\html\eAIP -c EB -l
fr-FR
Generate one HTML file for the whole AD 1.3 section:
makeaip-core AD-1.3 -d ..\..\Operations\2004-10-28\eAIP
-t ..\..\Operations\2004-10-28\html\eAIP
Generate one HTML file for the whole EADD Aerodrome:
makeaip-core AD-2.EADD -d
..\..\Operations\2004-10-28\eAIP -t
..\..\Operations\2004-10-28\html\eAIP
Generating a Supplement or Circular is very similar to generating an eAIP section. Simply replace the eAIP section id by the document name.
A limitation of MakeAIP-core's command-line syntax means that the names of all Supplements and Circulars begin with “eSUP” and “eAIC” respectively. Other eAIP publication tools may remove this limitation.
Example 5.2. MakeAIP-core AIC_or_SUP_name sub-command for PDF format
Generate one HTML file for a Supplement:
makeaip-core eSUP-2001-02 -d
..\..\Operations\2004-10-28\eSUP -t
..\..\Operations\2004-10-28\html\eSUP
Generate one AT file for the whole ENR 3.1 section, without Amendment indications (the PDF file is normally not produced in this case, but it can be generated if needed):
makeaip-core ENR-3.1 -f fo -d
..\..\Operations\2004-10-28\eAIP -t
..\..\Operations\2004-10-28\without-amdt-info -a false
makeaip-core ENR-3.1 -f at -s
..\..\Operations\2004-10-28\without-amdt-info -t
..\..\Operations\2004-10-28\without-amdt-info
The eAIP has a convenient HTML interface to browse the information it contains. This section describes the MakeAIP-core commands to generate the following components of this interface:
eAIP Table of Contents: the section called “MakeAIP-core Menu”
eAIP Amendment list of changes: the section called “MakeAIP-core AMDT”
List of AIP supplements in force: the section called “MakeAIP-core eSUPs”
List of Circulars in force: the section called “MakeAIP-core eAICs”
eAIP cover page: the section called “MakeAIP-core Cover”
History (Archive) page: the section called “MakeAIP-core History”
makeaip-core
{menu} [-s source_directory
] [-t target_directory
] [-l language
] [-c country-code
] [-p XSLT_processor
]
Generates the AIP table of contents in the file
XX-menu-yy-YY.html
, where XX is the country code
and yy-YY the language code. If there is no Amendment in the eAIP, a
table of contents will be generated anyway, based on the previous AIP
indicated in the eAIP. For more information, refer to the How to
Create an eAIP.
Path to the directory where the
eAIS-package.xml
file is located.
Example 5.3. MakeAIP-core menu sub-command
makeaip-core menu -s ..\..\Operations\2004-10-28 -t
..\..\Operations\2004-10-28\html\eAIP
makeaip-core
{AMDT} [-s source_directory
] [-t target_directory
] [-l language
] [-c country-code
] [-p XSLT_processor
]
Generates the list of changes, for the current AIP Amendment, in
the file XX-AMDT-yy-YY.html
, where XX is the
country code and yy-YY the language code. If there is no Amendment in
the eAIP, the file will contain an explanatory note.
Path to the directory where the
eAIS-package.xml
file is located.
Example 5.4. MakeAIP-core AMDT sub-command
makeaip-core AMDT -s ..\..\Operations\2004-10-28 -t
..\..\Operations\2004-10-28\html\eAIP
makeaip-core
{eSUPs} [-s source_directory
] [-t target_directory
] [-l language
] [-c country-code
] [-p XSLT_processor
]
Generates the list of AIP Supplements in force in the file
XX-eSUPs-yy-YY.html
, where XX is the country code
and yy-YY the language code.
Path to the directory where the
eAIS-package.xml
file is located.
Example 5.5. MakeAIP-core eSUPs sub-command
makeaip-core eSUPs -s ..\..\Operations\2004-10-28 -t
..\..\Operations\2004-10-28\html\eSUP
makeaip-core
{eAICs} [-s source_directory
] [-t target_directory
] [-l language
] [-c country-code
] [-p XSLT_processor
]
Generates the list of Circulars in force in the file
XX-eAICs-yy-YY.html
, where XX is the country code
and yy-YY the language code.
Path to the directory where the
eAIS-package.xml
file is located.
Example 5.6. MakeAIP-core eAICs sub-command
makeaip-core eAICs -s ..\..\Operations\2004-10-28 -t
..\..\Operations\2004-10-28\html\eAIC
makeaip-core
{cover} [-s source_directory
] [-t target_directory
] [-l language
] [-c country-code
] [-p XSLT_processor
]
Generates the eAIP cover page in the file
XX-cover-yy-YY.html
, where XX is the country code
and yy-YY the language code.
Path to the directory where the
eAIS-package.xml
file is located.
Example 5.7. MakeAIP-core eAICs sub-command
makeaip-core cover -s ..\..\Operations\2004-10-28 -t
..\..\Operations\2004-10-28\html
makeaip-core
{history} [-s source_directory
] [-t target_directory
] [-l language
] [-c country-code
] [-p XSLT_processor
]
Generates the list of published eAIPs in the file
XX-history-yy-YY.html
, where XX is the country
code and yy-YY the language code. This file must be re-generated each
time a new eAIP is published. The newly-generated file replaces the
previous one.
Path to the directory where the file
eAIS-packages.xml
, containing the list of
published eAIPs in XML format, is located.
Example 5.8. MakeAIP-core eAICs sub-command
makeaip-core history -s ..\..\Operations -t
..\..\Operations
An eAIP prepared for the European AIS Database (EAD) (more precisely, for the Published AIP Management System (PAMS)) needs a file named packmap.xml. For more information about this file, please see eAIP for EAD PAMS.
makeaip-core
{packmap} [-s source_directory
] [-p XSLT_processor
]
Generates the packmap.xml file for the eAIS description file found in the source directory. The generated file is saved in the source directory.
Path to the directory where the file
eAIS-package.xml
is located.
More information about validation can be found in the eAIP Validation chapter .
makeaip-core
{validator} [-d eAIP_directory
] [-l language
] [-c country-code
]
The validator does not convert the eAIP into any format. Instead, it validates the eAIP against the declared DTD.
When a program called by MakeAIP-core terminates with a proper error code, MakeAIP-core will ask the user if it should continue. At that time, one can press ctrl-C to stop MakeAIP-core or any other key to continue. This can be useful when generating all sections: the generation can take a couple of minutes, and a lot of information is output to the screen, so it is difficult to know if each file is generated without error.
This functionality can be switched off: refer to the last few lines of MakeAIP-core.bat.
Before using MakeAIP-core.bat it should be configured. There are two aspects to configure: the defaults parameters and the location and parameters of the XSLT processors.
MakeAIP-core.bat command line parameters can be set to default values, so that you do not need to specify them at each use:
Table 5.2.
Command line option | Signification | Initial value | Other possible values |
---|---|---|---|
-d | eAIP directory | eAIP | any |
-l | language | en-GB | any |
-c | ICAO country code | EC | any |
-p | XSLT processor | saxon | xalan, msxsl, xt |
To change the default values, edit MakeAIP-core.bat in a text editor such as Notepad, locate the section "Set defaults" near the top of the file and edit the parameters as required. Note that some parameters only accept a limited set of values.
We provide ready-made batch files for Saxon, Xalan, msxsl.exe, xt, FOP and XEP.
Saxon.bat is already configured to work with the supplied saxon.jar binary. Please note that in order to save space only this binary file is provided and not the whole Saxon distribution. The complete distribution is available at http://saxon.sourceforge.net/, including documentation and source code.
These files (or at least those for the processors/renderers that you will use) need to be edited with a text editor in order to specify the location of these programs, or more generally, how they should be executed. If a standard installation procedure is followed for each of them, their home directory is probably the only change required. To configure XEP, you may also need to change the name of XEP's jar file, which depends on the version you are using (client, server, etc.). Refer to XEP's own batch files for an example.
These batch scripts always take the same set of parameters:
For XSLT processors (xalan.bat, msxsl.bat, xt.bat):
xxx.bat XML XSLT OUTPUT param1-name param1-value
param2-name param2-value param3-name param3-value
where
XML is the source XML file;
XSLT is the stylesheet to use;
OUTPUT is the resulting file (html or fo);
paramX-name and -value are optional XSLT parameters name/value pairs.
Ready-made batch files for Saxon, Xalan, msxsl.exe, xt, FOP and XEP are provided.
Saxon.bat is already configured to work with the supplied saxon.jar binary. Please note that only the binary file is provided and not the whole Saxon distribution, in order to save space. The complete distribution is available at http://saxon.sourceforge.net/, including documentation and source code.
These files need to be edited (or at least those for the processors/renderers that will be used) with a text editor in order to specify the location of these programs, or more generally, how they should be executed. If a standard installation procedure for each of them was followed, the only their home directory may need changing. To configure XEP, the name of XEP's jar file may need changing which depends on the version being used (client, server, etc.). Refer to XEP's own batch files for an example.
These batch scripts always take the same set of parameters:
For XSL-FO renderers (FOP.bat, XEP.bat): xxx.bat FO
OUTPUT
where:
FO is the source XSL-FO file;
OUTPUT is the resulting file (pdf).
The validator.bat file is different to the others. It first calls a parser to validate the eAIP XML file. This validation is done in the classic XML meaning: the XML file is validated against the DTD that it declares.
Schematron.bat runs an XSLT processor to produce a Schematron validation report. This validates the eAIP against the Additional Rules.
Other processors may also be used: there are many other XSLT processors. To do this, simply copy an existing batch file, rename it and edit it following the program's command line syntax. Then, edit MakeAIP-core.bat and add your program's name to the variable xsltproc_list (for an XSLT processor) in the section "CONFIGURATION". Note that the program name you specify should only contain letters and numbers (no spaces or other special characters).
[1] These sub-commands generate components of the eAIP HTML interface. See also the eAIP Editor's Manual.