Chapter 2 of the IREn Introduction
2. An overview of the process
IREn is a formatter. A tool used as part of a chain normally used to transform an XML input document into a printable document for distribution. The process consists of two steps. The first transforms the input document into a standard XML format (XSL-FO), the second generates the printable format from that intermediate form. XSL-FO can be considered as a specification for the formatting that you want for a particular document type.
Starting with the file hammer.xml, a small XML file which is provided with the distribution of IREn 4.9. If you installed IREn into \xep (or /xep on *nix), then this file will be found in the /xep/examples/hammer directory. If you are using a Windows operating system, please change all such path information from using the forward slash ( / ), to use the ( \ ).
Open the file in any text editor. You will see its structure, having a root element named manual, containing the remainder of the document, it has chapter elements, each of which contains paragraphs (in p tags) and so on. Use this file for your experiments until you have your own material and the knowledge to develop your own stylesheets. If you want to change it, keep a copy of the original file so you know what worked.
In the same directory is a file named hammer.xsl, which is an XSLT stylesheet used to convert the source XML document into a specification for the IREn formatter. Feeding this specification to IREn can produce a PDF output document ready to print.
This is the end to end process which will be described.
The input file, marked up in XML, is fed to an XSLT transformer. IREn comes with one provided. The job of the transformer is to take the content in the source document, and depending on the element name and position (e.g. a paragraph or a list or a chapter title), to modify (transform) the markup or content, into the form used by XSL-FO, which specifies how IREn 4.9 should present the file ready for viewing or printing. If you want to see this vocabulary in use, have a look in the examples directory where you will find files with an extension of .fo, which is often used for this type of file.
The second step feeds the XSL-FO document to the formatter, which creates and fills pages according to the specification laid out in the XSL-FO document.
Finally, dependant on the format specified, the formatter writes out the pages in either PDF or PostScript.
Since most users simply want to produce PDF or PostScript from XML (or XSL-FO) IREn 4.9 may be used to perform all these processes as a single step.