Quantcast

XSL-FO: Area and Output Formats

In a previous article, we discussed XSL-FO documentation structure. In this article, we would discuss the Area attribute and the output format of XSL-FO.

The XSL formatting model defines a number of rectangular areas (boxes) to display output. All output (text, pictures, etc.) will be formatted into these boxes and then displayed or printed to a target media. Some of the areas such as pages, regions, block areas and line areas would be discussed here.

1- XSL-FO output is formatted into pages. Printed output will normally go into many separate pages. Browser output will often go into one long page. XSL-FO Pages contain Regions.

2- Each XSL-FO Page contains a number of Regions. The body of the page is known as region-body, header of the page is known as region-before, footer of the page is known as region-after, and the left and right sidebars are known as region-start and region-end respectively.

3- XSL-FO Block areas define small block elements (the ones that normally start with a new line) like paragraphs, tables and lists. XSL-FO Block areas can contain other Block areas, but most often they contain Line areas.

4- XSL-FO Line areas define text lines inside Block areas. XSL-FO Line areas contain Inline areas.

Now, we would talk a bit about XSL-FO output formats. Basically, XSL-FO defines output inside <fo:flow> elements.

“Blocks” of content “Flows” into “Pages” and then to the output media. XSL-FO output is normally nested inside <fo:block> elements, which is nested inside <fo:flow> elements, which is further nested inside <fo:page-sequence> elements:

In real coding, an XSL-FO example would be like this:

The simple output of the above code would be “Hello Coding”.

In next article, we would discuss other important details of XSL-FO.

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.