wiki:TestingXSLFO

Testing XSL FO

The open source XSL formatters are the best sources for tools for testing formatted documents. The xmlroff XSL formatter (  http://xmlroff.org/) has a framework for rasterising PDF or PostScript output and comparing formatted pages against a reference, and the FOP XSL formatter (  http://xmlgraphics.apache.org/fop/) has a framework for comparing the XML renditions of its area tree against a reference.

A description of available test suites is at  http://xmlroff.org/wiki/XSLTestSuites.

xmlroff Testing Module

This module serves multiple purposes for the xmlroff XSL formatter:

  • Comparing results between different versions of xmlroff
  • Comparing results between xmlroff’s different output formats
  • Comparing xmlroff output to files produced another way, e.g., from a different formatter – FO or otherwise

See xmlroff Testing Module.

FOP Layout Engine Tests

FOP’s layout engine tests are integrated with other JUnit tests that are run in the FOP build process. Each test includes a complete FO document, and assertions are made (and checked) about the FOP-specific area-tree that results from formatting the FO document with FOP.

See FOP Layout Engine Tests

RenderX Validators

RenderX has multiple XSL-FO validators at  http://www.renderx.com/tools/validators.html