What is XSL-FO?
XSL-FO stands for Extensible Stylesheet Language Formatting Objects. It is a XML-based markup language for formatting XML data.
How does it look?
How is it defined?
Typically FO template has two sections. One is ‘fo:layout-master-set’ and another is ‘fo:page-sequence master-reference=”main-template”’
The ‘layout-master-set’ section can contain multiple templates and each template is defined with ‘fo:simple-page-master master-name=”main_template”’. And this is where you can define your report output page size, margin, etc.
The ‘page-sequence’ section references to a particular template that is defined in the ‘simple-page-master’ and this is where you can define the page content’s formatting and layout.
There are more detail in the XSL-FO language, but I’m not covering the detail since we don’t really need the detail for BI Publisher. If you are interested more in detail please take a look at w3school’s site. They have pretty good contents not only this XSL-FO but any other XML related.
Why this is for BI Publisher?
With a typical BI publisher report development I have seen only a few times where I needed to use XSL-FO codes. Of course you can enhance your BI Publisher reports by using the XSL-FO codes, but most of things can be done by using a combination of the BI Publisher tags, MS-Word native functions, and XSL/XPath.
Only place I see where it used to be very convenient to use XSL-FO codes is a conditional formatting. But the recent versions of BI Publisher Template Builder provide a conditional formatting UI and use predefined attributes. So really we don’t need the XSL-FO code anymore.
BI Publisher Conditional Formatting Menue
BI Publisher Conditional Formatting Dialog
Good understanding of XSL-FO allows you to do the RTF Template development much more flexible. Also, you can start developing with a XSL-FO template rather than RTF Template and do any type of custom formatting by using the XSLT, XPATH, and XSL-FO. But I’d recommend you start developing with RTF Template with MS-Word/Template Builder because it’s much simple and easy and more importantly much more productive. You can always generate a XSL-FO template from your existing RTF template by using a Template Builder’s export function.
Ok, with this post I’ve covered pretty much the basic of XML that you need to know for your BI Publisher template development. From the next post I’ll start covering more on the BI Publisher Enterprise server side such as Custom deployment, JDBC management, report access monitoring, performance tuning, etc. So stay tuned!