XSL-FO Tutorials - Herong's Tutorial Examples

http://www.herongyang.com/XSL-FO

Copyright © 2016 by Dr. Herong Yang. All rights reserved.

XSL-FO Tutorials This free book is a collection of tutorial notes and sample codes written by the author while he was learning XSL-FO (Extensible Stylesheet Language - Formatting Objects) himself. Topics include XSL, FO, XML, PDF, Formatting, Pagination, Layout, Styling, Header, Footer, Graphics, PDF, Graphics, Fonts, Tables, Hyperlinks.

Table of Contents

About This XSL-FO Tutorial Book

Introduction of XSL-FO

What Is XSL (eXtensible Stylesheet Language)

What Is XSLT (XSL Transformations)

What Is XSL-FO (XSL - Formatting Objects)

hello.fo - Sample XSL-FO document

Apache™ FOP (Formatting Objects Processor)

What Is Apache™ FOP?

FOP Download and Installation

FOP Installation Verification

"fop" Command and Options

"fop -fo" - Formatting XSL-FO Files

"fop -xml -xsl" - Transformation and Formatting

"fop -xml -xsl -foout" - XSLT Transformations

RenderX XEP as an XSL-FO Tool

What Is XEP?

Downloading and Installing XEP

RenderX XEP Example - Borders.fo

Introduction of Area Model

What Is XSL Area Model?

What Is an Area?

Inline Stacking and Block Stacking

XSL-FO Document Basics and Examples

Document Top Level Structure Rules

Example - hello.fo

Example - Page-Break-with-Header.fo

Example - Cover-Page-and-Two-Columns.fo

Page Layout Masters

Layout Declarations

simple-page-master - Simple Page Layout

simple-page-master Attributes and Sub Elements

simple-page-master/region-body Sub Element

region-before and region-after Sub Elements

region-start and region-end Sub Elements

"Body" Region Margin and "Side" Region Extent

Precedence of Side Region Corners

Page Layout and Page Sequence Mapping

What Is "page-sequence-master"?

Layout Sequence Example - Cover and Content

Wheat Is "repeatable-page-master-alternatives"?

Layout Sequence Example - Odd and Even Pages

Block-Level Formatting Objects

What Are Block-Level Formatting Objects?

What Is "block" Formatting Object?

"block" Formatting Object Examples

Margin Collapsed between Block Areas

space-before/space-after vs. Margin

Block Splitting for Page Break

"block" with Mixed Content

Controlling White Space Characters

What Is "block-container" Formatting Object?

Inline-Level Formatting Objects

What Are Inline-Level Formatting Objects?

What Is "inline" Formatting Object?

"inline" Splitting for Line Break

What Is "line-height" Attribute?

What Is "baseline-shift" Attribute?

"inline" with Mixed Content

FOP Failed on "block" inside "inline"

What Is "inline-container" Formatting Object?

What Is "charecter" Formatting Object?

What Is "leader" Formatting Object?

What Are "page-number*" Formatting Objects?

Including Graphics in XSL-FO document

What Is "external-graphic" Formatting Object?

Control DPI with "content-width" and "content-height"

Fixed Higher DPI with "scale-to-fit"

Resolution Included in Image Files

Image Over and Under Flow Area

"external-graphic" with SVG Diagram

"instream-foreign-object" Formatting Object

Table of Rows and Columns

Table Formatting Object Tree

Table Cell Borders Collapsed and Separated

Table Row Borders and Column Borders

Table Column Headers and Footers

Table and Column Width Control

Table Column and Row Merge or Span

Table with Caption

List, Item, Label, and Body

List Formatting Object Tree

Impact of start-indent on list-item-body

Area Model of List Item, Label and Body

Floating Blocks - "float" and "footnote"

What Is "float" Formatting Object?

"float" Formatting Object Shifting to Left

clear="..." - Block Cleared from Side-Float

"float" Formatting Object Moving to Top

Adding "xsl-before-float" Separator

"footnote" Formatting Object

Adding "xsl-footnote" Separator

Hyperlinks, Table of Contents and Indexes

What Is "basic-link" Formatting Object?

"basic-link" with "internal-destination" Attribute

Clickable Table of Content

Building Back-of-Book Indexes

Headers and Footers using "static-content"

Page Header in region-before Area

Page Header with 3 Parts

Page Footer with 3 Parts

Page Headers for Multiple Chapters

Font Attributes and Font Families

What Is a Font?

Font Attributes and Generic Fonts

Adobe PDF Base-14 Fonts

Generic Font for Chinese Characters

Apache FOP Font Configurations

FOP Auto-Detecting Fonts

Using SimHei Font for Chinese Characters

RenderX XEP Font Configurations

XEP Font Configuration Settings

XEP Predefined Font Test

Configuring SimHei Font for Chinese Characters

References

PDF Printing Version

Keywords: XSL-FO, XML, Stylesheet, Formatting, Object, Tutorial