XSL format output

The XSLT standard was developed primarily to support the XSL formatting language (see Chapter 17 for details). In this case, it is necessary to create a file that contains formatting instructions, and the output must be an XML document that contains elements and attributes that hold this formatting information. The Formatting Objects namespace defines these elements and attributes. In the specification, and in all the examples in this book, the elements have a namespace prefix of 'fo' (formatting object) to distinguish them from XSLT elements. For example, to format a Note element as a bold paragraph block, the 'block' element is required, with a 'font-weight' attribute that indicates bold styling:

 <xsl:template match="note"> ...

Get XSL companion, The 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.