OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK-APPS: Trouble with transforming XML to PDF


Hi there,

Total newbie here.  I'm trying to work my way through an article on using
DocBook that I found in September's issue of "Inside XML Solutions", the
Element K XML journal. I created a simple XML file that conforms to the
DocBook DTD, and now I'm working through the article, using various XSL
stylesheets to transform that XML file into various output formats.  I was
able to generate HTML from my XML file, but I can't seem to generate PDF.  I
can run the command to generate an FO (formatted object) file, which seems
to be a necessary intermediate step, but when I run the following command to
turn the FO file into a PDF file:

	java org.apache.fop.apps.Fop book.fo book.pdf

I get the following warning (repeated several times) and error:

	WARNING: property 'master-reference' ignored (this is repeated
several times)
	ERROR: org.apache.fop.apps.FOPException: 'master-name' for
'fo:page-sequence' matches no 'simple-page-master' or 'page-sequence-master'

After consulting the FOP Web site (see SET-UP, below), I also tried
generating the PDF file straight from the XML using the following command,
but still go the same error:

	java org.apache.fop.apps.Fop -xml book.xml -xsl
docbook-xsl-1.47-experimental/fo/docbook.xsl -pdf book.pdf

The versions of some of the tools I'm using have changed since the writing
of the article, and I'm wondering if there is an incompatibility now.  Or
perhaps my Java environment is set up funky.  Or maybe my commands are
wrong.  Also, I installed Xalan and Xerces (see SET-UP below for details),
but FOP also comes with its own, different, versions of these two  - so many
copies of things, so many different versions, it makes the head spin!

Anybody have any idea how to turn an XML file that conforms to the DocBook
DTD into a PDF?

TIA,

-Ariel Anderson


SET-UP:
1) I installed the latest, non-beta, version of DocBook, version 4.1.2,
which I downloaded from http://oasis-open.org/docbook/xml/4.1.2/.  

2) I installed the latest, experimental, version of Norman Walsh's XSL
stylesheet set for XML, version 1.47-exp, which I got from
http://docbook.sourceforge.net/projects/xsl/.

3) I installed the Xerces2 Java Parser 2.0.0, (beta3) Release, which I
downloaded from http://xml.apache.org
4) I installed Xalan-Java version 2, which also came from
http://xml.apache.org
5) I installed the FOP version 0.20.1, also from http://xml.apache.org

6) I created a simple XML file that supposedly conforms to the DocBook DTD:

	<?xml version="1.0" encoding="UTF-8"?>
	<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
		"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
	<book>
		<title>Installing Mixologist</title>
		<chapter>
			<title>Introduction</title>
			<para>This handbook is the installation guide for
<application>Mixologist</application>, the online bartender's aide. By
following the instructions in this handbook, you'll be able to install this
system onto your computer.
			</para>
		</chapter>
	</book>




---------------------------------------------------------
Ariel Anderson
Continuing Education of the Bar
(510) 302-0744  |  Ariel.Anderson@ceb.ucop.edu



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC