Tests in this set show the use of various XSL FO objects and properties. These tests may be useful for understanding basics of XSL FO and assessing XSL FO formatter conformance.
All examples have common XML markup, translated into XSL FO via a dedicated XSLT stylesheet macro.xsl. Images referenced from these tests can be downloaded here: images.zip.
Enumerates the glyph repertory of standard PDF Latin fonts (Adobe Extended Roman character set) and lists Unicode values for glyphs therein.
Source XML: adobe-standard.xml |
Stylesheets needed: macro.xsl |
Output: adobe-standard.fo adobe-standard.pdf |
Tests XSL-FO attributes dealing with horizontal text alignment: text-align, text-indent, text-align-last.
Source XML: align.xml |
Stylesheets needed: macro.xsl |
Output: align.fo align.pdf |
Demonstrates aspect-preserving font size adjustment.
Source XML: aspect.xml |
Stylesheets needed: macro.xsl |
Output: aspect.fo aspect.pdf |
Shows how to alter vertical position of inline elements: subscripts/superscripts.
Source XML: baseline-shift.xml |
Stylesheets needed: macro.xsl |
Output: baseline-shift.fo baseline-shift.pdf |
Tests RenderX extensions to control background image sizing and scaling. The following attributes are involved: rx:background-content-height, rx:background-content-width, rx:background-scaling.
Source XML: bgimage-sized.xml |
Stylesheets needed: macro.xsl |
Output: bgimage-sized.fo bgimage-sized.pdf |
Tests background image placement and tiling.
Source XML: bgimage.xml |
Stylesheets needed: macro.xsl |
Output: bgimage.fo bgimage.pdf |
Tests different font weights.
Source XML: bold.xml |
Stylesheets needed: macro.xsl |
Output: bold.fo bold.pdf |
Shows border attributes: colors, widths and styles.
Source XML: borders.xml |
Stylesheets needed: macro.xsl |
Output: borders.fo borders.pdf |
Tests RGB color treatment and predefined color keywords in various contexts - text, background, and borders.
Source XML: color.xml |
Stylesheets needed: macro.xsl |
Output: color.fo color.pdf |
Tests multi-column pages and reference-orientation on page regions.
Source XML: columns.xml |
Stylesheets needed: macro.xsl |
Output: columns.fo columns.pdf |
Tests absolute and relative placement, borders, and reference orientation on <fo:block-container> elements.
Source XML: containers.xml |
Stylesheets needed: macro.xsl |
Output: containers.fo containers.pdf |
Demonstrates text decoration attributes - underline, overline, and strikethrough.
Source XML: decoration.xml |
Stylesheets needed: macro.xsl |
Output: decoration.fo decoration.pdf |
Tests standard PDF fonts (Helvetica, Times, Courier, Symbol, ZapfDingbats), extra (embedded) fonts, and generic font families. Also demonstrates usage of multiple fonts in font-family.
Source XML: family.xml |
Stylesheets needed: macro.xsl |
Output: family.fo family.pdf |
Tests first-line formatting - <fo:initial-property-set> element.
Source XML: firstline.xml |
Stylesheets needed: macro.xsl |
Output: firstline.fo firstline.pdf |
Tests processing of footnotes in multi-column layouts.
Source XML: footnotes.xml |
Stylesheets needed: macro.xsl |
Output: footnotes.fo footnotes.pdf |
Demonstrates usage of force-page-count attribute to pad the length of page sequences. Also tests conditional page master references for blank pages.
Source XML: force-page-count.xml |
Stylesheets needed: macro.xsl |
Output: force-page-count.fo force-page-count.pdf |
Tests borders and backgrounds on side regions, with special emphasis on reference orientation.
Source XML: headers.xml |
Stylesheets needed: macro.xsl |
Output: headers.fo headers.pdf |
Tests scaling and vertical positioning on inline images.
Source XML: images-inline.xml |
Stylesheets needed: macro.xsl |
Output: images-inline.fo images-inline.pdf |
Tests various indentation attributes: start-indent, end-indent, text-indent, and last-line-end-indent.
Source XML: indent.xml |
Stylesheets needed: macro.xsl |
Output: indent.fo indent.pdf |
Tests borders and background on <fo:inline> element, including conditional borders/padding.
Source XML: inline-borders.xml |
Stylesheets needed: macro.xsl |
Output: inline-borders.fo inline-borders.pdf |
Tests slant variations of fonts: italic, oblique, backslant.
Source XML: italic.xml |
Stylesheets needed: macro.xsl |
Output: italic.fo italic.pdf |
Tests several types of <fo:leader> elements: space-filled, dot-filled, rule-filled, patterned.
Source XML: leader.xml |
Stylesheets needed: macro.xsl |
Output: leader.fo leader.pdf |
Tests control over line splitting.
Source XML: linebreak.xml |
Stylesheets needed: macro.xsl |
Output: linebreak.fo linebreak.pdf |
Tests line-height attribute.
Source XML: lineheight.xml |
Stylesheets needed: macro.xsl |
Output: lineheight.fo lineheight.pdf |
Tests XSL-FO elements to build various lists.
Source XML: lists.xml |
Stylesheets needed: macro.xsl |
Output: lists.fo lists.pdf |
Tests running headers/footers functionality, implemented through <fo:marker>/<fo:retrieve-marker> elements.
Source XML: marker.xml |
Stylesheets needed: macro.xsl |
Output: marker.fo marker.pdf |
Shows the effects of maximum-repeats attribute on <fo:repeatable-page-master-reference> and <fo:repeatable-page-master-alternatives> elements.
Source XML: maximum-repeats.xml |
Stylesheets needed: macro.xsl |
Output: maximum-repeats.fo maximum-repeats.pdf |
Explores padding attributes on blocks. Both split-up and shorthand padding specifiers are tested.
Source XML: padding.xml |
Stylesheets needed: macro.xsl |
Output: padding.fo padding.pdf |
Tests page break control via keep-together attribute.
Source XML: pagebreak.xml |
Stylesheets needed: macro.xsl |
Output: pagebreak.fo pagebreak.pdf |
Tests named regions functionality and fo:static-content elements.
Source XML: pagemaster.xml |
Stylesheets needed: macro.xsl |
Output: pagemaster.fo pagemaster.pdf |
Tests processing of complex page sequence masters.
Source XML: pagesequence.xml |
Stylesheets needed: macro.xsl |
Output: pagesequence.fo pagesequence.pdf |
Tests parsing of font shorthand attribute.
Source XML: sh-font.xml |
Stylesheets needed: macro.xsl |
Output: sh-font.fo sh-font.pdf |
Tests font shadow effects.
Source XML: shadow.xml |
Stylesheets needed: macro.xsl |
Output: shadow.fo shadow.pdf |
Tests side floats and their interaction, with emphasis on clear and intrusion-displace properties.
Source XML: side-floats.xml |
Stylesheets needed: macro.xsl |
Output: side-floats.fo side-floats.pdf |
Tests different ways to specify font size.
Source XML: size.xml |
Stylesheets needed: macro.xsl |
Output: size.fo size.pdf |
Tests smallcaps variant for fonts.
Source XML: smallcaps.xml |
Stylesheets needed: macro.xsl |
Output: smallcaps.fo smallcaps.pdf |
Tests block margin properties - space-before and space-after.
Source XML: space-before.xml |
Stylesheets needed: macro.xsl |
Output: space-before.fo space-before.pdf |
Tests inter-word and inter-character spacing - letter-spacing and word-spacing attributes.
Source XML: spacing.xml |
Stylesheets needed: macro.xsl |
Output: spacing.fo spacing.pdf |
Tests different line stacking strategies.
Source XML: stacking.xml |
Stylesheets needed: macro.xsl |
Output: stacking.fo stacking.pdf |
Tests horizontal scaling of text via font-stretch attribute.
Source XML: stretch.xml |
Stylesheets needed: macro.xsl |
Output: stretch.fo stretch.pdf |
Enumerates the glyph repertory of Adobe Symbol font and lists Unicode values for glyphs therein.
Source XML: symbol.xml |
Stylesheets needed: macro.xsl |
Output: symbol.fo symbol.pdf |
Contains examples of <fo:table-column> usage.
Source XML: table_columns.xml |
Stylesheets needed: macro.xsl |
Output: table_columns.fo table_columns.pdf |
Tests row group elements for tables: fo:table-header, fo:table-footer, and two fo:table-body.
Source XML: table_headers.xml |
Stylesheets needed: macro.xsl |
Output: table_headers.fo table_headers.pdf |
Tests basic table functionality.
Source XML: table_plain.xml |
Stylesheets needed: macro.xsl |
Output: table_plain.fo table_plain.pdf |
Tests complex table layouts, with cells spanning multiple columns and/or rows.
Source XML: table_spans.xml |
Stylesheets needed: macro.xsl |
Output: table_spans.fo table_spans.pdf |
Shows text case transformations.
Source XML: transform.xml |
Stylesheets needed: macro.xsl |
Output: transform.fo transform.pdf |
Enumerates the glyph repertory of Zapf Dingbats font and lists Unicode values for glyphs therein.
Source XML: zapf-dingbats.xml |
Stylesheets needed: macro.xsl |
Output: zapf-dingbats.fo zapf-dingbats.pdf |