XSL-FO

 
   
  Table of Contents
  Index
  Reviews
  Reader Reviews
XSL-FO
By Dave Pawson
   
Publisher : O'Reilly
Pub Date : August 2002
ISBN : 0-596-00355-2
Pages : 282  



 

Extensible Style Language-Formatting Objects, or XSL-FO, is a set of tools developers and web designers use to describe page printouts of their XML (including XHTML) documents. XSL-FO teaches you how to think about the formatting of your documents and guides you through the questions you'll need to ask to ensure that your printed documents meet the same high standards as your computer-generated content.

777


 
    Copyright
    Preface
      Who Should Read This Book?
      What Does This Book Cover?
      Motivation
      Organization of This Book
      What Else Do You Need?
      Conventions Used in This Book
      How to Contact Us
      Acknowledgments
   
    Chapter 1.  Planning for XSL-FO
      Section 1.1.  XML and Document Processing
      Section 1.2.  Choosing Your Print Production Approach
      Section 1.3.  Choosing Tools
      Section 1.4.  The Future for XSL-FO
   
    Chapter 2.  A First Look at XSL-FO
      Section 2.1.  An XSL-FO Overview
      Section 2.2.  Related Stylesheet Specifications
      Section 2.3.  Using XSL-FO as Part of XSL
      Section 2.4.  Shorthand, Short Form, and Inheritance
   
    Chapter 3.  Pagination
      Section 3.1.  Document Classes
      Section 3.2.  The Main Parts of an XSL-FO Document
      Section 3.3.  Simple Page Master
      Section 3.4.  Complex Pagination
      Section 3.5.  Page Sequences
   
    Chapter 4.  Areas
      Section 4.1.  Informal Definition of an Area
      Section 4.2.  Area Types
      Section 4.3.  Components of an Area
      Section 4.4.  Reference Areas
      Section 4.5.  Area Positioning
   
    Chapter 5.  Blocks
      Section 5.1.  Block Basics
      Section 5.2.  Blocks for Special Purposes
      Section 5.3.  Decorating Blocks
      Section 5.4.  Lists
      Section 5.5.  Tables
      Section 5.6.  Additional Material
   
    Chapter 6.  Inline Elements
      Section 6.1.  Content
      Section 6.2.  Inline Styling
      Section 6.3.  Other Uses
   
    Chapter 7.  Graphics and Color
      Section 7.1.  Graphics
      Section 7.2.  Basic Color Usage
      Section 7.3.  Color Specification
      Section 7.4.  Color Profiles
      Section 7.5.  Applicability
   
    Chapter 8.  Styling at the Character Level
      Section 8.1.  General Character Properties
      Section 8.2.  Fonts
   
    Chapter 9.  Cross-Document Links
      Section 9.1.  Cross-Document Links
      Section 9.2.  Indexing and Tables of Contents
      Section 9.3.  Running Headers
   
    Chapter 10.  Putting It All Together
      Section 10.1.  Outline
   
    Chapter 11.  Stylesheet Organization
      Section 11.1.  Classes of Stylesheets
      Section 11.2.  Page Layout
      Section 11.3.  Main Flows
      Section 11.4.  Inclusion and Importing
   
    Appendix A.  How Do I Do That?
    Appendix B.  Finding Your Way Aroundthe Specification
      Section B.1.  Overview
   
    Appendix C.  Today's Tools
      Section C.1.  RenderX XEP Formatter
      Section C.2.  Antenna House Formatter
      Section C.3.  FOP Formatter
      Section C.4.  PassiveTEX Formatter
      Section C.5.  Unicorn Formatting Objects Formatter
      Section C.6.  Formatting Objects Authoring Tool
      Section C.7.  Render Engine from XML/XSL to PDF
      Section C.8.  jfor, Java XSL-FO to RTF converter
      Section C.9.  XMLmind FO Converter
      Section C.10.  XSLfast
      Section C.11.  Epic Editor V4.2
      Section C.12.  IBM XSL Formatting Objects Composer (XFC)
      Section C.13.  Summary
   
    Appendix D.  Objects, Properties, andCompliance Levels
      Section D.1.  Basic, Extended or Complete?
      Section D.2.  Property Summary
   
    Appendix E.  Inheritance Characteristics
      Section E.1.  Font-, Character-, and Spacing-Related Properties
   
    Appendix F.  Examples for Chapter 10
    Appendix G.  Elements and Valid Properties
      Section G.1.  XSL-FO Elements and Their Properties
      Section G.2.  Properties and the Elements to Which They Apply
   
    Appendix H.  GNU Free DocumentationLicense (GFDL)
      Section H.1.  Preamble
      Section H.2.  Applicability and Definitions
      Section H.3.  Verbatim Copying
      Section H.4.  Copying in Quantity
      Section H.5.  Modifications
      Section H.6.  Combining Documents
      Section H.7.  Collections of Documents
      Section H.8.  Aggregation with Independent Works
      Section H.9.  Translation
      Section H.10.  Termination
      Section H.11.  Future Revisions of This License
      Section H.12.  Addendum: How to Use This License for Your Documents
   
    Glossary
      A
      B
      F
      G
      I
      K
      L
      P
      O
      R
      S
      T
      W
      V
   
    Colophon
    Index

Copyright

Copyright 2002 O'Reilly & Associates, Inc. All rights reserved.

Printed in the United States of America.

Published by O'Reilly & Associates, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.

O'Reilly & Associates books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://safari.oreilly.com). For more information contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com.

Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly & Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. The association between the image of a pennant-winged nightjar and the topic of XSL-FO is a trademark of O'Reilly & Associates, Inc.

While every precaution has been taken in the preparation of this book, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

Certain parts of this document are taken from the Extensible Stylesheet Language (XSL) Version 1.0 W3C Proposed Recommendation 28 August 2001, found at http://www.w3.org/TR/xsl/, which has a copyright statement at http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Copyright. These are Copyright August 2001, World Wide Web Consortium (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, and Keio University).

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being no invariant sections, with the Front-Cover Texts being no invariant sections, and with the Back-Cover Texts being no invariant sections. A copy of the license is included in Appendix H, GNU Free Documentation License. All images are to be included verbatim when the document is copied, distributed, or modified under the terms of the GFDL.

Preface

This book is an introduction to Extensible Stylesheet Language Formatting Objects (XSL-FO). The Extensible Stylesheet Language (XSL) provides a means of producing high-quality print output from your XML documents. XSL describes how to use XSL Transformations (XSLT) to generate XSL-FO documents that represent page layouts. Using XSL, you can create standard print representations of XML documents using XSL-FO to specify how information should appear on pages.

Who Should Read This Book?

This book is for people who want to create print versions of their XML documents. It provides an introduction to the XSL as specified by the World Wide Web Consortium (W3C) at http://www.w3.org/Style/XSL. It focuses, in particular, on the XSL-FO aspect of XSL, an XML vocabulary targeted at expressing how source content should be laid out and paginated for presentation.

This book should be useful to everyone from technical authors who have moved into stylesheet design to software developers engaged in media design to those exploring the developing XML family of standards. If you are curious about XSL-FO or want to produce print output from XML, read on. When you stop enjoying the chase, stop reading. When you reach an "Aha!" moment, smile with me. I'm not saying it's easy, but this avenue of learning can be fun. You'll be rewarded quickly by the feedback of visual output, although there are a few dead ends.

I make few assumptions about the audience other than a familiarity with basic XML and an awareness of XSLT processing. You won't enjoy this book until you can process XML with an XSLT processor. With that in mind, my recommendation for a companion volume is Mike Kay's XSLT Programmer's Reference (Wrox Press). It's an excellent reference book that has never failed to explain to me how to use the W3C recommendation.

The intended audience of this book is users of the recommendation, not implementors. If you want to implement the specification then the specification is your primary reading matter, though this book may be of some assistance.

What Does This Book Cover?

This book covers the same content found in the published recommendation. The focus throughout this book is to help users of XSL-FO. It is not a theoretical discourse on the recommendation, but a complement to the recommendation. I have tried to write something that bridges the gap between implementor and user, with a bias towards the user.

Motivation

A large part of my motivation for writing this book was my experience with Document Style Semantics and Specification Language (DSSSL), an SGML style language. I had approached DSSSL within weeks of learning that SGML existed and that it was supported by accessible tools. The tools were not well explained, however. My struggles with DSSSL, SGML, Scheme, and Emacs, all in one go, were very nearly too much. Very few technologies can gain support without sufficient explanatory material available to the end user. So with that in mind, and my reaction to XSL-FO similar to what I had with DSSSL, I decided to do something about it.

Organization of This Book

Chapter 1 provides a brief explanation of what XSL-FO is good for and how it can fit into your XML print production processes.

Chapter 2 introduces the big picture of XSL-FO, its foundations, and its capabilities.

Chapter 3 explores XSL-FO's notions of pages, page masters, and page sequences.

Chapter 4 explains how to define areas, which hold content within pages.

Chapter 5 introduces blocks, the units of the document that fill areas, which may be split across areas and pages, and reflect document components such as paragraphs, tables, and figures.

Chapter 6 explains the special inline formatting that may occur inside block elements.

Chapter 7 explores XSL-FO's facilities for presenting information using graphics and color.

Chapter 8 explores XSL-FO's text-specific capabilities.

Chapter 9 examines how XSL-FO lets you create links for use with chapters, cross-references, indexes, and similar structures so you may present documents that feel complete.

Chapter 10 examines how all the different pieces interact and combine when XSLT and XSL-FO are used to produce formatted renderings.

Chapter 11 examines different types of stylesheets and issues of inclusion and reuse.

Appendix A provides a quick reference for common formatting tasks and the best ways to support them in XSL-FO.

Appendix B provides you with a basic framework for reading the W3C's XSL Recommendation in detail, as it isn't exactly light reading.

Appendix C lists a variety of XSL-FO tools available at the time of writing.

Appendix D explains the compliance levels that XSL-FO permits processors to support. This appendix should help you determine which implementation is appropriate to your needs.

Appendix E provides a quick guide to which properties are inherited among formatting objects.

Appendix F provides a full listing of the XSLT stylesheet created in Chapter 10.

Appendix G helps you pick the property or trait you need for a given task.

Appendix H provides the most updated version of the license at the time of this printing.

The Glossary lists terms you'll need to use XSL-FO effectively.

What Else Do You Need?

As mentioned earlier, you'll need some level of understanding of how to obtain an XML document compliant to the XSL-FO vocabulary from an XML document. Plenty of examples are provided, but use of XSLT is necessary, because I do not believe that authoring directly in XSL-FO is either viable or especially worthwhile. I always assume your starting point is an XML instance and that the resultant XSL-FO is a temporary intermediary file that will be thrown away once the final form document is available.

Next, you'll want a processor to convert the XSL-FO into its final form, either a printed document on paper or a PDF document for web delivery. Appendix C addresses the options, covering tools available from the Web as part of the open source movement through to commercial offerings and embedded tools.

Conventions Used in This Book

The following font conventions have been used in this book:

Italic

Is used to introduce new terms, as well as for email addresses and URLs.

Constant width

Is used for code examples and fragments, as well as for functions and properties.

Constant width bold

Is used to highlight a section of code being discussed in the text.

Constant width italic

Is used for replaceable elements in code examples.

Theis icon indicates a tip, suggestion, or general note.

 

This icon indicates a warning or caution.

I have, when discussing the elements and attributes of XSL-FO, frequently omitted the namespace prefix, as it should be clear from the context. Where examples are included inline, I have attempted to keep them reasonably short. Most examples are accompanied by images taken from the final output to show their actual appearance. If your processor does not produce identical output, there are two possibilities: you've created your code slightly differently than the example or your processor is interpreting the specification differently than the one I've used. The latter case will happen until a far wider experience is fed back to the Working Group for resolution. Even then, there are places where implementations will differ and both will be correct in the strictest terms. Implementation dependencies are, for now, a fact of life.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O'Reilly & Associates, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
(800) 998-9938 (in the United States or Canada)
(707) 829-0515 (international/local)
(707) 829-0104 (fax)

There is a web page for this book, which lists errata, examples, or any additional information. You can access this page at:

http://www.oreilly.com/catalog/xslfo/

To comment or ask technical questions about this book, send email to:

bookquestions@oreilly.com

For more information about books, conferences, Resource Centers, and the O'Reilly Network, see the O'Reilly web site at:

http://www.oreilly.com

Acknowledgments

First, I'd like to thank Norman Walsh (http://nwalsh.com) and predecessors for docbook, without whom this book would have been written in Word. For his stylesheets, now gaining even wider adoption, and his support over the last four years.

To Nikolai Grigoriev of RenderX and Arved Sandstrom of e-plicity and FOP, and Karen Lease, also a member of the FOP team, for their contributions, and also for their early support of the belief that we could write a book.

To the reviewers for their valuable contributions: Paul Grosso, Norman Walsh, Jeni Tennison, and David Eisenberg. It's far better for their input.

To Sue, my wife, for her patience and understanding when I'm on the computer instead of doing other things on my to-do list.

To my current employer, Royal National Institute of the Blind in the United Kingdom, who gave me the opportunity to get some way along the path to understanding the XML family, thank you Keith.

Last but not least to Simon and Len at O'Reilly, who made it a real treat to deal with a publisher, thank you.



XSL-FO
Xsl Fo
ISBN: 0596003552
EAN: 2147483647
Year: 2002
Pages: 24
Authors: Dave Pawson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net