XSL-FO
Transformations with XSL-FO
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
- Select the XSL-FO entry in the XSL menu.
→ The XSL-FO window appears. - → The Single tab is already selected by default with the first call.
If this is not the case, please select now the 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.
- Press the button.
→ The Open dialogue appears.
- Choose the path to the input document in your file system.
- 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.
- Press the button.
→ The Open dialogue appears.
- Choose the path to the stylesheet in your file system.
- Click Open.
Selection of the target document
As target document you need a file in which the transformation can be written in.
- Press the button.
→ The Save as dialogue appears.
- Choose the path to the target folder in your file system.
- Enter a unique name for the target document under File name.
- Click Save.
Starting the transformation
Press the 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
- Select the XSL-FO entry in the XSL menu.
→ The XSL-FO window appears. - Select the 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.
- Press the button.
→ The Search folder dialogue appears.
- Choose the path to the input folder in your file system.
- 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.
- Press the button.
→ The Open dialogue appears.
- Choose the path to the stylesheet in your file system.
- Click Open.
Selection of the target folder
As target folder you need a folder in which the target documents are stored.
- Press the button.
→ The Search folder dialogue appears.
- Choose the path to the target folder in your file system.
- Click OK.
Starting the transformation
Press the 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
- Select the XSL-FO entry in the XSL menu.
→ The XSL-FO window appears. - Select the 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 PageSelect 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- Select the Antenna House option under Which Formatter?.
→ The Settings button appears in the same window. - Press the Settings button.
→ The dialogue window for the entry of the path name appears. - Press the change button.
→ The Search folderr dialogue appears. - Choose the path to the AHFCmd.exe file in the Antenna House programme folder.
- Click ok.
→ The FO formatter is activated.
- Select the Antenna House option under Which Formatter?.
- 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- Select the RenderX option under Which Formatter?.
→ The Settings button appears in the same window. - Press the Settings button.
→ The dialogue window for the entry of the path name appears. - Press the change button.
→ The Search folder dialogue appears. - Choose the path to the xep.bat file in the RenderX programme folder.
- Click ok.
→ The FO formatter is activated.
- Select the RenderX option under Which Formatter?.
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.