You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Meltem Kogelbauer <me...@netdecisions.co.uk> on 2002/02/27 17:35:17 UTC
newbie in town
Hi All,
I have download FOB and want to use it as a standalone application to test
XML transformnations to PDF using XSLT.
Using this command line in command promt;
D:\fop-0.20.3>fob -xml test.xml -xsl test.xsl -pdf test.pdf
it build the formatting object tree, parses the document and then stops the
renderer giving the following error:
'master-reference' for 'fo:page-sequence' matches no 'simple-page-master' or
'page-sequence-master'
here is the XML
<greeting>
Hello, World!
</greeting>
and, here is the xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="xml"/>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master margin-right="75pt" margin-left="75pt"
page-height="11in" page-width="8.5in"
margin-bottom="25pt" margin-top="25pt" master-name="main">
<fo:region-before extent="25pt"/>
<fo:region-body margin-top="50pt" margin-bottom="50pt"/>
<fo:region-after extent="25pt"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="standard">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-name="main"
odd-or-even="any"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-name="standard">
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="greeting"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="greeting">
<fo:block line-height="76pt" font-size="72pt" text-align="center">
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
</xsl:stylesheet>
I cannot get the PDF output, please help.
Meltem
Re: newbie in town
Posted by Jeremias Maerki <je...@outline.ch>.
> 'master-reference' for 'fo:page-sequence' matches no 'simple-page-master' or
> 'page-sequence-master'
You have to change some of the "master-name" attributes to
"master-reference" to be conformant with the XSL REC.
> <fo:conditional-page-master-reference master-name="main"
> odd-or-even="any"/>
<fo:conditional-page-master-reference master-reference="main" odd-or-even="any"/>
<fo:page-sequence master-reference="standard">
Cheers,
Jeremias Märki
mailto:jeremias.maerki@outline.ch
OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 41 317 20 20 - Fax +41 41 317 20 29
Internet http://www.outline.ch