ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Lopez <william.lo...@eds.com>
Subject <fop> error
Date Mon, 17 Nov 2003 22:16:31 GMT
Hello List:

I can  get the transformation to work via an XML editor so I *think* it 
has something to do with the Ant task (can't explain why it works with 
the editor using same files)- I can't find anything in the archives 
related to this. I'm running WinXP box, Ant 1.5.3 & FOP 0.20.5, J2SE 
1.4.2_02...the error states "master-reference '' for fo:page-sequence 
matches no simple-page-master or page-sequence-master" but the 
references do refer to defined sequences...task, error listed 
below...thanks!

<fo:layout-master-set>
        <fo:simple-page-master margin-right="0.5in" margin-left="0.8in" 
margin-bottom="0.5in" margin-top="0.5in" page-width="8.5in" 
page-height="11in" master-name="cover">
            <fo:region-body margin-top="1in"/>
        </fo:simple-page-master>
        <fo:simple-page-master margin-left="0.5in" margin-bottom="0.5in" 
margin-top="0.5in" page-width="8.5in" page-height="11in" 
master-name="contents">
            <fo:region-before extent=".79in"/>
            <fo:region-body overflow="visible" padding="4mm" 
margin-top="1in"/>
            <fo:region-after extent=".79in"/>
        </fo:simple-page-master>
        <fo:page-sequence-master master-name="simplePages">
            <fo:single-page-master-reference master-reference="cover"/>
            <fo:repeatable-page-master-reference 
master-reference="contents"/>
        </fo:page-sequence-master>
    </fo:layout-master-set>
    <fo:page-sequence master-name="cover">
          ....
    </fo:page-sequence>
    <fo:page-sequence initial-page-number="2" master-name="contents">
         .....
    </fo:page-sequence>

...here are the tasks definitions:

 <path id="fop-jars">
      <pathelement location="${dir.fop}\build\fop.jar"/>
      <pathelement 
location="${dir.fop}\lib\avalon-framework-cvs-20020806.jar"/>
      <pathelement location="${dir.fop}\lib\batik.jar"/>
      <pathelement location="${dir.fop}\lib\jimi-1.0.jar" />
      <pathelement location="${dir.fop}\lib\jai_core.jar" />
      <pathelement location="${dir.fop}\lib\jai_codec.jar" />
      <pathelement location="${dir.xalan.home}\xalan.jar"/>
      <pathelement location="${dir.xalan.home}\xml-apis.jar"/>
      <pathelement location="${dir.xalan.home}\xercesImpl.jar"/>
      <pathelement location="${dir.xalan.home}\bin\xsltc.jar"/>
  </path>

  <taskdef name="fop"
         classname="org.apache.fop.tools.anttasks.Fop">
         <classpath>
            <path refid="fop-jars"/>
         </classpath>
  </taskdef>

<target name="generate-pdf">
    <fop format="application/pdf"
         outdir="${dir.fop.output}"
         messagelevel="info"
         basedir="${dir.fop.fo}">
      <fileset dir="${dir.fop.fo}">
        <include name="*.fo"/>
      </fileset>
    </fop>
  </target>

...and the exception:

BUILD FAILED
file:E:/CM/Projects/Test/planojava/xslfo_basic.xml:71: 
org.apache.fop.apps.FOPException: 
file:/E:/CM/Projects/Test/planojava/fo/planojavaxml_xslfo_17-November-2003.fo:17:39 
master-reference '' for fo:page-sequence matches no simple-page-master 
or page-sequence-master
    at org.apache.fop.tools.anttasks.FOPTaskStarter.render(Fop.java:457)
    at org.apache.fop.tools.anttasks.FOPTaskStarter.run(Fop.java:416)
    at org.apache.fop.tools.anttasks.Fop.execute(Fop.java:256)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    at org.apache.tools.ant.Main.runBuild(Main.java:609)
    at org.apache.tools.ant.Main.start(Main.java:196)
    at org.apache.tools.ant.Main.main(Main.java:235)
Caused by: org.apache.fop.apps.FOPException: 
file:/E:/CM/Projects/Test/planojava/fo/planojavaxml_xslfo_17-November-2003.fo:17:39 
master-reference '' for fo:page-sequence matches no simple-page-master 
or page-sequence-master
    at 
org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:307)
    at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262)
    at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
    at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)
    at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown

Source)
    at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.fop.apps.Driver.render(Driver.java:498)
    at org.apache.fop.apps.Driver.run(Driver.java:565)
    at org.apache.fop.tools.anttasks.FOPTaskStarter.render(Fop.java:454)
    ... 10 more
--- Nested Exception ---
org.apache.fop.apps.FOPException: 
file:/E:/CM/Projects/Test/planojava/fo/planojavaxml_xslfo_17-November-2003.fo:17:39 
master-reference '' for fo:page-sequence matches no simple-page-master 
or page-sequence-master
    at 
org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:307)
    at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262)
    at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
    at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)
    at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown

Source)
    at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.fop.apps.Driver.render(Driver.java:498)
    at org.apache.fop.apps.Driver.run(Driver.java:565)
    at org.apache.fop.tools.anttasks.FOPTaskStarter.render(Fop.java:454)
    at org.apache.fop.tools.anttasks.FOPTaskStarter.run(Fop.java:416)
    at org.apache.fop.tools.anttasks.Fop.execute(Fop.java:256)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    at org.apache.tools.ant.Main.runBuild(Main.java:609)
    at org.apache.tools.ant.Main.start(Main.java:196)
    at org.apache.tools.ant.Main.main(Main.java:235)

Total time: 2 seconds



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message