A Basic XSL-FO Document

Now, let’s take a look at how a typical XSL-FO document might be structured. For the sake of discussion and learning about objects and properties, you are going to work with content inserted directly into the XSL document. However, in the end of the chapter, I will explore some examples with XSL-FO integrated with XSL, to use stylesheets as they were intended, to dynamically format data from XML files.

For now, though, let’s look at a very basic XSL-FO document, which will simply display the text “A Simple Document” in a 64pt serif font:

 <?xml version=”1.0”?> <fo:root xmlns:fo=”http://www.w3.org/1999/XSL/Format”> <fo:layout-master-set> <fo:simple-page-master master-name=”title_page”> <fo:region-body/> </fo:simple-page-master> ...

Get Special Edition Using XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.