XSL-FO

Transformations with XSL-FO

Tab: Single

Tab: Folder

Tab: Properties

Background

With this feature you have the possibility to generate PDF documents individually or folder wise by means of XSL-FO operations. For this purpose various formatters can be used.
data2type: XML technologies → XSL-FO → Formatter comparison

Modifications of the transformation process

You may make various settings on the Saxon XSLT processor used.

A description of these possibilities can be found in the following section:
data2type: antillesXML help → Settings

Tab: Single

Transformations of single files

Here you can see how to generate PDF documents from single files by means of XSL-FO.

Calling up the XSL-FO window
  1. Select the XSL-FO entry in the XSL menu.
    → The XSL-FO window appears.
  2. → The Single tab is already selected by default with the first call.
    If this is not the case, please select now the Single tab.

    XSL-FO window with active Single tab

Selection of the input document

As input document you need a file whose elements and data shall be transformed.

Depending on the purpose of application and the XSL stylesheet used, this file may consist of different forms of processible data.
Usually, such a file is already a XML file.

  1. Press the  Button for opening the input document button.

    → The Open dialogue appears.

  2. Choose the path to the input document in your file system.
  3. Click Open.
Indication of the stylesheet file

As stylesheet you need a XSLT file which transforms the input document into the new output format.
These XSLT files have to be FO stylesheets.

The individual templates embed the extracted elements and data from the input document in a master layout.

  1. Press the  Button for opening a stylesheet  button.

    → The Open dialogue appears.

  2. Choose the path to the stylesheet in your file system.
  3. Click Open.
Selection of the target document

As target document you need a file in which the transformation can be written in.

  1. Press the  Button for selection a target document button.

    → The Save as dialogue appears.

  2. Choose the path to the target folder in your file system.
  3. Enter a unique name for the target document under File name.
  4. Click Save.
Starting the transformation

Press the  Button for starting the transformation button.

→ The target document has been written to the location selected by you.

In addition, the result of the transformation is shown in the Statistics window in the Results tab.
In case error messages occur during the transformation, they are displayed in the Statistics window in the Log tab.

Tab: Folder

Transformations of entire folders

Here you can see how to generate PDF documents from entire folders by means of XSL-FO.
Usually, such data are already XML files.

Calling up the XSL-FO window
  1. Select the XSL-FO entry in the XSL menu.
    → The XSL-FO window appears.
  2. Select the Folder tab.

XSL-FO window with active Folder tab

Selection of the input folder

As input folder you need a folder whose files shall be transformed.
Depending on the purpose of application and the XSL stylesheet used, this folder may consist of different forms of processible files.

  1. Press the  Button for selecting the input folder button.

    → The Search folder dialogue appears.

  2. Choose the path to the input folder in your file system.
  3. Click OK.
Indication of the stylesheet file

As stylesheet you need a XSLT file which transforms the input documents into the new output format.
These XSLT files have to be FO stylesheets.
The individual templates embed the extracted elements and data from the input document in a master layout.

  1. Press the  Button for opening a stylesheet  button.

    → The Open dialogue appears.

  2. Choose the path to the stylesheet in your file system.
  3. Click Open.
Selection of the target folder

As target folder you need a folder in which the target documents are stored.

  1. Press the  Button for selecting the target folder button.

    → The Search folder dialogue appears.

  2. Choose the path to the target folder in your file system.
  3. Click OK.
Starting the transformation

Press the  Button for starting the transformation button.

→ The target documents have been written to the location selected by you.

In addition, the result of the transformation is displayed in the Statistics window in the Results tab.
In case error messages occur during the transformation, they are displayed in the Statistics window in the Log tab.

Tab: Properties

Transformations with several FO formatters

For the rendering process you can choose between three different FO formatters.
By default the Apache FOP is preinstalled and set. However, further FO formatters can be embedded.

Further links on the subject formatters:
data2type: XML technologies → XSL-FO → Formatter comparison

Calling up the XSL-FO window
  1. Select the XSL-FO entry in the XSL menu.
    → The XSL-FO window appears.
  2. Select the Properties tab.

XSL-FO window with active Properties tab

Options of the Properties tab
Selection of the formatter

  • PDF generation with the Apache FOP

    This FO formatter is already preinstalled in antillesXML and activated by default.
    The Apache FOP covers largely the Basic Conformance Level of the W3C Recommendation for XSL-FO.

    Further links on the subject Apache FOP:
    Apache FOP: Introduction
    Apache FOP: Apache FOP Compliance Page

    Select the Apache FOP 1.0 option under Which Formatter?.
    → The FO formatter is activated.

  • PDF generation with the Antenna House Formatter

    "The commercial XSL Formatter of Antenna House is the first and only tool which is able to process and wrap automatedly very complex works on the basis of the XSL-FO Standard. The Formatter meets all print relevant requirements of the XSL-FO Standard. Moreover, the Formatter offers a whole range of additional functionalities not included in the XSL-FO Standard, but which are absolutely necessary for the professional typesetting."

    Further links on the subject Antenna House Formatter:
    Antenna House: Products
    Antenna House: XSL-FO → XSL-FO 1.1 Conformance

    1. Select the Antenna House option under Which Formatter?.
      → The Settings button appears in the same window.
    2. Press the Settings button.
      → The dialogue window for the entry of the path name appears.
    3. Press the change button.
      → The Search folderr dialogue appears.
    4. Choose the path to the AHFCmd.exe file in the Antenna House programme folder.
    5. Click ok.
      → The FO formatter is activated.

  • PDF generation with the RenderX XEP Engine

    The likewise commercial FO formatter of RenderX covers large parts of the XSL-FO Standard, but does not reach the dimensions of the Antenna House Formatter.
    Further links on the subject RenderX XEP Engine:
    RenderX: Products → XEP Engine
    RenderX: XEP User Guide → Appendix A. XSL-FO Conformance

    1. Select the RenderX option under Which Formatter?.
      → The Settings button appears in the same window.
    2. Press the Settings button.
      → The dialogue window for the entry of the path name appears.
    3. Press the change button.
      → The Search folder dialogue appears.
    4. Choose the path to the xep.bat file in the RenderX programme folder.
    5. Click ok.
      → The FO formatter is activated.

Enforcing the output of a FO file

By default, only one PDF document is generated.
During the transformation process, elements and data are embedded from the XML document in the FO master layout before the document is transformed into a PDF document with the appropriate FO formatter.
For the error analysis it may be useful to have a closer look at the FO file.

Activate the Create *.fo Files check box.
→ Now, in addition to the PDF document the appropriate FO file is generated.