Vikram,
 
Your xsl file must start with the following:
 
<xsl:template match ="/">
 <fo:root xmlns:fo="
http://www.w3.org/1999/XSL/Format">
 
  <!-- defines page layout -->
  <fo:layout-master-set>
 
   <fo:simple-page-master master-name="simple"
          page-height="29.7cm"
          page-width="21cm"
          margin-top="1.5cm"
          margin-bottom="2cm"
          margin-left="2.5cm"
          margin-right="2.5cm">
    <fo:region-body margin-top="3cm"/>
    <fo:region-before extent="1.5cm"/>
    <fo:region-after extent="1.5cm"/>
   </fo:simple-page-master>
  </fo:layout-master-set>
 
  <fo:page-sequence master-reference="simple">
 
where the fo:page-sequence is actually referencing the master page named 'simple'. if you changed
<fo:simple-page-master master-name="simple"
into
<fo:simple-page-master master-reference="simple"
 
it explain why it is not working ...
 
Hope this helps,
 
Denis

----- Original Message -----
Sent: Tuesday, May 28, 2002 3:42 PM
Subject: RE: Exception while running xml examples

Hi Denis,
 
I am using the xml2pdf.xsl which comes as part of the download. I have not changed anything in it, except the property master-name to master-reference. I get the same error.
 
If I misspell the master -reference, it ignores it and generates the pdf but its an incomplete pdf.
 
Rgs
Vikram
-----Original Message-----
From: Denis Thierry [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 28, 2002 7:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Exception while running xml examples

Hi,
 
It just means that you made something wrong in your xsl file. When you declare a page sequence you have to reference it against a master page defined earlier in your xsl file ... That's the way it knows the overall layout to use for the page sequence ... 
Hence you need to open your xsl file, look for a page master name, and create the reference when creating your page sequence.
 
Regards,
 
Denis
----- Original Message -----
Sent: Tuesday, May 28, 2002 3:27 PM
Subject: Exception while running xml examples

Hi all,

I am trying to convert the xml docs into pdf using command line. I get the following error on output:

[ERROR]: 'master-reference' for 'fo:page-sequence'matches no 'simple-page-master
' or 'page-sequence-master'

The command that I gave was:
D:\fop-0.20.3>fop -xsl .\docs\xml-docs\xml2pdf.xsl -xml .\docs\xml-docs\fop\bugs
.xml -pdf a.pdf

As per the release notes, I have changed the master-name property to master-reference on fo:page-sequence where it appears on the xml2pdf.xsl.
What am I missing?
Rgs
Vikram

Reply via email to