Chapter 5 of the IREn Introduction
5. Using the command line
For those used to the flexibility of the command line interface, one is provided with IREn.
If you've never used the command line on Windows, it is available from the start menu, programs, and either directly as an option or as a tab from the accessories tab. Normally called Command prompt. The window that pops up is the command line interface to Windows. If you type help it responds by listing all the commands it understands. You may want to create a temporary directory to work in, perhaps c:\myfiles. If you avoid using spaces in the directory names, it makes working with the command line that much easier.
Taking the same example as previously, to format hammer.xml using hammer.xsl, to produce hammer.pdf, the following command line is used. The script xep.bat is a part of the distribution, found in the top level installation directory.
The command below is split over 3 lines for readability. It should remain on one line, so just remove the \ characters used to indicate a continuation line.
>\xep\xep.bat -xml \xep\examples\hammer\hammer.xml \
-xsl \xep\examples\hammer\hammer.xsl \
-out hammer.pdf
Finally, as a command line exercise, to produce hammer.fo, the matching XSL-FO file. If you can find out where java is installed, and add it to your environment path variable. If you installed IREn into /xep, the command is
>java -jar /xep4/lib/saxon.jar -o hammer.fo \
/xep4/examples/hammer/hammer.xml \
/xep4/examples/hammer/hammer.xsl
This uses the Saxon XSLT engine, another java tool, to produce hammer.fo, in the current working directory. Saxon takes its parameters as shown. The output is specified using the -o option, then the input file and stylesheet are appended. So the general form is
>java -jar saxon.jar \
-o outputFile \
inputFile \
stylesheet
If that makes sense to you, you can now start to use your own XML files to produce output suitable for the IREn formatter.