A Basic XSL-FO Document

Now, let's see how a typical XSL-FO document might be structured. For the sake of discussion and learning about Objects and Properties, we are going to work with content inserted directly into the XSL document. However, at the end of the chapter, we 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 “Hello World” in a 64pt sans-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> </fo:layout-master-set> ...

Get Special Edition Using XML, Second Edition 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.