21. Migration of existing XSL-FO files

This section describes how to migrate existing XSL-FO files to the FO Designer. Note we explicitelly use the word migrate to remark that the FO Designer is not an XSLT editor, therefore it is not posible to import XSL-FO files 1 to 1. Instead we provide a tool that will preserve most of the layout of your existing report and most of the style (fonts, colors and alignments). However you will still need to do some fine adjustments.


We will improve the tool over the next releases, contact us if you have some files you cannot migrate.

Limitations

You will get the best result will the miigration tool if:

Some current limitation in the tool today are:

Migration step by step

The migration tool is located in the File menu:




after selecting it, the open file dialog will shown. Make sure you select a valid xsl-fo file:



If the file is valid the system will propose the creation of a FO Designer report. On the right hand side the report areas will be displayed (marked below with red squares) and the fields within the areas:





If you double click on the output area on the right ("detail area 2"), the corresponding source element in the input file will be selected on the left handside window "Table width..." in this case.




As rule of thumb  (there are some exceptions), the tool will create a new output area for each one of these input elements:


The same concept applies for output fields which will be mapped to input "value-of":


Use now the "Create report" button



this will create a new project and the report template.


the next step is checking whether the Xpath's of the areas are correct. Note for this you need to have an understanding of how the designer works. If you are completely new to the FO Designer please have a look at our "Learn by doing" chapter in the main help page.

Afterwards check the individual XPath of th fields.


In the project there will be also a file called migrationLog.html. In this file you can see what the designer was able to migrate and how. Look for the OUTPUT lines with yellow or red background color and whose text is "IGNORING" or "ERROR". These will give you a hint on what you need to manually correct in the report.


The final step would be running the report.
For this:

In case the output is not the expected one, use the trace button (2 below). Please refer to the chapter "Structure of the template -> How to analyze the report execution".