Yhteystiedot
Yleisen kielitieteen laitos
PL 9 (Siltavuorenpenger 20 A)
00014 Helsingin yliopisto
Puhelinvaihde +358 (09) 1911
Faksi +358 (09) 191 29307
|
|
11. XSL-FO (XSL Formatting Objects).
- Lecture notes
- Further reading
- Practical work: Xalan and FOP on venus
-
On Windows, start XSession and login to venus via Putty
(make sure "Enable X11 forwarding" is ticked in Putty
configuration).
-
Copy Pawson's examples
doc1.xml and
doc1-fo.xsl
to your directory.
Use Xalan to transform the XML file with the XSLT stylesheet by
./clt232-xalan -in doc1.xml -xsl doc1-fo.xsl
-out doc1.fo
View the output Formatting Objects (.fo) file in a text editor.
-
Copy the shell script
clt232-fop to your directory.
Make it executable (chmod +x clt232-fop).
This script runs the open source Java
FOP Formatting Objects Processor.
-
Use FOP to transform the Formatting Objects file to PDF by
./clt232-fop -fo doc1.fo -pdf doc1.pdf
View the output PDF file with Adobe Reader.
-
Do the same with Pawson's examples
doc2.xml and
doc2-fo.xsl.
12. More XSL-FO. Transforming XML to PDF.
- Lecture notes
- Further reading
- Practical work: Xalan and FOP on venus (continued)
-
Copy Tidwell's
sonnet-fo.xsl
stylesheet (updated by G. Wilcock) to your directory.
Transform the sonnet from XML to XSL-FO by
./clt232-xalan -in sonnet130.xml -xsl sonnet-fo.xsl
-out sonnet130.fo
-
Use FOP to transform the Formatting Objects file to PDF by
./clt232-fop -fo sonnet130.fo -pdf sonnet130.pdf
View the output PDF file with Adobe Reader.
(You can also print it.)
-
FOP can also use Xalan to go from XML to PDF in one command by
./clt232-fop -xml sonnet130.xml -xsl sonnet-fo.xsl
-pdf sonnet130.pdf
Assignment 5.
© 2001-2006 Graham Wilcock
|