Creating the XSLT Stylesheet

I could translate ch14_01.xml into a document using the formatting objects by hand. As mentioned, however, that doesn't really work for anything but short documents in general. The usual technique is to create an XSLT stylesheet that you can use to transform a document so that it uses the XSL formatting objects, and I'll do that in this chapter. Here's what that stylesheet, ch14_02.xsl, is going to look like; in this case, I'm using a large font for text, 36 point:

Listing . ch14_02.xsl
 <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version='1.0'> <xsl:template match="PLANETS"> <fo:root> <fo:layout-master-set> <fo:simple-page-master ...

Get Real World XML 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.