Quantcast

XSL-FO is a scripting extension of XML which stands for Extensible Stylesheet Language Formatting Objects. Its main purpose is to format XML data for output to screen, paper or other media. A prior knowledge of XML is required to learn XSL-FO. In this tutorial, we would discuss the structure of XSL-FO documents in detail.

XSL-FO documents are stored in files with a .fo or a .fob file extension. You can also store XSL-FO documents with an .xml extension (to make them more accessible to XML editors). Following example would help you understand the structure of an XML document:

An XSL-FO document starts with an XML declaration, which in the above example was:

The <fo:root> element is the root element of XSL-FO documents. The root element also declares the namespace for XSL-FO:

The <fo:layout-master-set> element contains one or more page templates:

Each <fo:simple-page-master> element contains a single page template. Each template must have a unique name (master-name):

One or more <fo:page-sequence> elements describe the page contents. The master-reference attribute refers to the simple-page-master template with the same name:

Other important aspects of XSL-FO would be discussed in future tutorials.

Looking for a quality hosting service? here are a few I suggest.
BlueHost | HostGator | Media Temple
Admin
Admin
Ali has been an entrepreneur in web, video and related technologies. Having worked with many business across the globe, Ali stands truly a great pillar in the business working with him.