O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required