Skip to Content
Real World XML
book

Real World XML

by Steven Holzner
January 2003
Beginner to intermediate content levelBeginner to intermediate
1200 pages
23h 42m
English
Peachpit Press
Content preview from Real World XML

Transforming a Document into Formatting Object Form

To transform ch14_01.xml into a document that uses formatting objects, which I'll call ch14_03.fo, all I have to do is apply the stylesheet ch14_02.xsl to ch14_01.xml. You can do that using the XSLT techniques we saw in the previous chapter. For example, you can use the ch13_05.class application like this (this assumes that ch13_05.class, ch14_01.xml, and ch14_02.xsl are all in the current directory):

%java ch13_05 ch14_01.xml ch14_02.xsl ch14_03.fo 

The document ch14_03.fo uses the XSL formatting objects to specify how the document should be formatted. Here's what ch14_03.po looks like:

Listing . ch14_03.po
 <?xml version="1.0" encoding="UTF-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Inside XML

Inside XML

Steven Holzner
XML Hacks

XML Hacks

Michael Fitzgerald

Publisher Resources

ISBN: 0735712867Purchase book