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 Bob Stayton <bo...@sagehill.net> on 2007/06/10 04:36:16 UTC
Re: [docbook-apps] trouble using FOP to process FO file generated by Xalan or Saxon
Hi Jeff,
The XIncludes in your XML file are not resolving. That leaves your book improperly stuctured, leading to improperly structured FO output. You should have seen an error message from the stylesheet about not having a template that matches "xi:include".
You need to set up either Saxon or Xalan with a recent version of Xerces parser and with the XInclude option turned on. See this section in my book:
http://www.sagehill.net/docbookxsl/Xinclude.html#JavaXIncludes
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: Jeff Powanda
To: docbook-apps@lists.oasis-open.org ; fop-users@xmlgraphics.apache.org
Sent: Saturday, June 09, 2007 5:34 PM
Subject: [docbook-apps] trouble using FOP to process FO file generated by Xalan or Saxon
I was using xsltproc as my XSLT processor, but it ran out of memory on a large book, so I decided to try Xalan and Saxon to convert a test book. I set up Xalan and Saxon according to the instructions in Bob Stayton's book, DocBook XSL: The Definitive Guide (http://www.sagehill.net/docbookxsl/index.html). However, when I try to use FOP 0.93 to convert either of the attached FO files, it reports the following exception:
org.xml.sax.SAXParseException: Content is not allowed in prolog.
I pasted full output of the exception below.
Has anyone else experienced this problem? Please take a look at the attached FO files and tell me what's wrong.
Regards,
Jeff Powanda
[Fatal Error] :1:1: Content is not allowed in prolog.
Jun 9, 2007 5:21:38 PM org.apache.fop.image.analyser.XMLReader createDocument
WARNING: Error while constructing image from XML
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at org.apache.fop.image.analyser.XMLReader.createDocument(XMLReader.java:115)
at org.apache.fop.image.analyser.XMLReader.loadImage(XMLReader.java:95)
at org.apache.fop.image.analyser.XMLReader.verifySignature(XMLReader.java:65)
at org.apache.fop.image.analyser.ImageReaderFactory.make(ImageReaderFactory.java:85)
at org.apache.fop.image.ImageFactory.loadImage(ImageFactory.java:220)
at org.apache.fop.image.ImageLoader.loadImage(ImageLoader.java:56)
at org.apache.fop.image.ContextImageCache.getImage(ImageFactory.java:432)
at org.apache.fop.image.ImageFactory.getImage(ImageFactory.java:157)
at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:68)
at org.apache.fop.fo.FObj.processNode(FObj.java:118)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:321)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
Jun 9, 2007 5:21:38 PM org.apache.fop.image.ImageFactory loadImage
SEVERE: Error while recovering image information () : null
java.lang.NullPointerException
at org.apache.fop.image.analyser.XMLReader.verifySignature(XMLReader.java:66)
at org.apache.fop.image.analyser.ImageReaderFactory.make(ImageReaderFactory.java:85)
at org.apache.fop.image.ImageFactory.loadImage(ImageFactory.java:220)
at org.apache.fop.image.ImageLoader.loadImage(ImageLoader.java:56)
at org.apache.fop.image.ContextImageCache.getImage(ImageFactory.java:432)
at org.apache.fop.image.ImageFactory.getImage(ImageFactory.java:157)
at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:68)
at org.apache.fop.fo.FObj.processNode(FObj.java:118)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:321)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
Jun 9, 2007 5:21:38 PM org.apache.fop.fo.flow.ExternalGraphic bind
SEVERE: Image not available: url()
Jun 9, 2007 5:21:39 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234: Error(13/11234): fo:block is not a valid child element of fo:root.
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
---------
javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234: Error(13/11234): fo:block is not a valid child element of fo:root.
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
Caused by: org.apache.fop.fo.ValidationException: file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234: Error(13/11234): fo:block is not a valid child element of fo:root.
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:393)
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:378)
at org.apache.fop.fo.pagination.Root.validateChildNode(Root.java:127)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:303)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
... 4 more
---------
org.apache.fop.fo.ValidationException: file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234: Error(13/11234): fo:block is not a valid child element of fo:root.
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:393)
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:378)
at org.apache.fop.fo.pagination.Root.validateChildNode(Root.java:127)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:303)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
Re: [docbook-apps] trouble using FOP to process FO file generated
by Xalan or Saxon
Posted by Chris Bowditch <bo...@hotmail.com>.
ttowle wrote:
> Yes thx that seemed to change things with FOP .94 but now have this error
> message:
> ------------------------------
> enerate-xslfo-user-manual:
> [echo] Generating XSLFO user manual
> generate-pdf-user-manual:
> [echo] Generating PDF user manual
> [java] There is no main method in class: org.apache.fop.apps.Fop
> BUILD FAILED: C:\Documents and Settings\I266482\My
> Documents\RAD\framework_docbook\scripts\build.xml:162: Java returned: 1
> Total time: 1 minute 29 seconds
> --------------------------------------
> Comments are appreciated.
How do you call FOP? Are you using a home written Java application which
calls the FOP API? The API changed considerably between 0.20.5 and 0.9x,
so you will need to rewrite your program.
See the website for details of other key differences between 0.20.5 and
0.9x:
http://xmlgraphics.apache.org/fop/0.94/upgrading.html
Chris
<snip/>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: [docbook-apps] trouble using FOP to process FO file generated
by Xalan or Saxon
Posted by ttowle <to...@bcbsil.com>.
Yes thx that seemed to change things with FOP .94 but now have this error
message:
------------------------------
enerate-xslfo-user-manual:
[echo] Generating XSLFO user manual
generate-pdf-user-manual:
[echo] Generating PDF user manual
[java] There is no main method in class: org.apache.fop.apps.Fop
BUILD FAILED: C:\Documents and Settings\I266482\My
Documents\RAD\framework_docbook\scripts\build.xml:162: Java returned: 1
Total time: 1 minute 29 seconds
--------------------------------------
Comments are appreciated.
Andreas L Delmelle wrote:
>
> On Sep 24, 2007, at 20:49, ttowle wrote:
>
> Hi
>
>> Xinlcude works with HTML but not with FOP- The same sysproperty
>> key= ...
>> which converts the Xincludes in HTML does not work for the FO. Any
>> tips
>> would be appreciated.
>
> From what you included below, it is obvious that XInclude is not the
> problem in your case...
>
>> Snippet --------------------------------
>> <target name="generate-pdf-user-manual"
>> depends="generate-xslfo-user-manual">
>> <echo message="Generating PDF user manual" />
>> <java classname="org.apache.fop.apps.Fop"
>> classpathref="fop.lib.path"
> <snip />
>> [java] [INFO] FOP 0.20.5
>> [java] [INFO] Using org.apache.xerces.parsers.SAXParser as
>> SAX2 Parser
>> [java] [INFO] building formatting object tree
>> [java] [INFO] setting up fonts
>> [java] [ERROR] property - "background-position-horizontal" is not
>> implemented yet.
>> [java] [ERROR] property - "background-position-vertical" is not
>> implemented yet.
>> ----- cut out ----
>
> What it says: these properties were not implemented in FOP 0.20.x.
> I'd suggest upgrading to 0.94, which does offer support for them.
>
> HTH!
>
> Cheers
>
> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/trouble-using-FOP-to-process-FO-file-generated-by-Xalan-or-Saxon-tf3895977.html#a12869197
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: [docbook-apps] trouble using FOP to process FO file generated by Xalan or Saxon
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Sep 24, 2007, at 20:49, ttowle wrote:
Hi
> Xinlcude works with HTML but not with FOP- The same sysproperty
> key= ...
> which converts the Xincludes in HTML does not work for the FO. Any
> tips
> would be appreciated.
From what you included below, it is obvious that XInclude is not the
problem in your case...
> Snippet --------------------------------
> <target name="generate-pdf-user-manual"
> depends="generate-xslfo-user-manual">
> <echo message="Generating PDF user manual" />
> <java classname="org.apache.fop.apps.Fop"
> classpathref="fop.lib.path"
<snip />
> [java] [INFO] FOP 0.20.5
> [java] [INFO] Using org.apache.xerces.parsers.SAXParser as
> SAX2 Parser
> [java] [INFO] building formatting object tree
> [java] [INFO] setting up fonts
> [java] [ERROR] property - "background-position-horizontal" is not
> implemented yet.
> [java] [ERROR] property - "background-position-vertical" is not
> implemented yet.
> ----- cut out ----
What it says: these properties were not implemented in FOP 0.20.x.
I'd suggest upgrading to 0.94, which does offer support for them.
HTH!
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: [docbook-apps] trouble using FOP to process FO file generated
by Xalan or Saxon
Posted by ttowle <to...@bcbsil.com>.
Xinlcude works with HTML but not with FOP- The same sysproperty key= ...
which converts the Xincludes in HTML does not work for the FO. Any tips
would be appreciated.
Snippet --------------------------------
<target name="generate-pdf-user-manual"
depends="generate-xslfo-user-manual">
<echo message="Generating PDF user manual" />
<java classname="org.apache.fop.apps.Fop" classpathref="fop.lib.path"
fork="true" failonerror="true">
<sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration"
value="org.apache.xerces.parsers.XIncludeParserConfiguration" />
----------------------------------------------
error result
-----------------------
echo] Generating PDF user manual
[java] [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[java] [INFO] FOP 0.20.5
[java] [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[java] [INFO] building formatting object tree
[java] [INFO] setting up fonts
[java] [ERROR] property - "background-position-horizontal" is not
implemented yet.
[java] [ERROR] property - "background-position-vertical" is not
implemented yet.
----- cut out ----
[java] [ERROR] Error in start-indent property value '10':
org.apache.fop.fo.expr.PropertyException: No conversion defined
[java] [INFO] [5]
[java] [ERROR] null
BUILD FAILED: C:\Documents and Settings\My
Documents\RAD\fxxx_docbook\scripts\build.xml:162: Java returned: 2
Total time: 1 minute 13 seconds
---error message link-----
<java classname="org.apache.fop.apps.Fop" classpathref="fop.lib.path"
fork="true" failonerror="true">
Thx for the help
You need to set up either Saxon or Xalan with a recent version of Xerces
parser and with the XInclude option turned on. See this section in my
book:
http://www.sagehill.net/docbookxsl/Xinclude.html#JavaXIncludes
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: Jeff Powanda <ma...@vocera.com>
To: docbook-apps@lists.oasis-open.org ;
fop-users@xmlgraphics.apache.org
Sent: Saturday, June 09, 2007 5:34 PM
Subject: [docbook-apps] trouble using FOP to process FO file
generated by Xalan or Saxon
I was using xsltproc as my XSLT processor, but it ran out of
memory on a large book, so I decided to try Xalan and Saxon to convert a
test book. I set up Xalan and Saxon according to the instructions in Bob
Stayton's book, DocBook XSL: The Definitive Guide
(http://www.sagehill.net/docbookxsl/index.html). However, when I try to
use FOP 0.93 to convert either of the attached FO files, it reports the
following exception:
org.xml.sax.SAXParseException: Content is not allowed in prolog.
I pasted full output of the exception below.
Has anyone else experienced this problem? Please take a look at
the attached FO files and tell me what's wrong.
Regards,
Jeff Powanda
[Fatal Error] :1:1: Content is not allowed in prolog.
Jun 9, 2007 5:21:38 PM org.apache.fop.image.analyser.XMLReader
createDocument
WARNING: Error while constructing image from XML
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.DOMParser.parse(Unknown
Source)
at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at
org.apache.fop.image.analyser.XMLReader.createDocument(XMLReader.java:11
5)
at
org.apache.fop.image.analyser.XMLReader.loadImage(XMLReader.java:95)
at
org.apache.fop.image.analyser.XMLReader.verifySignature(XMLReader.java:6
5)
at
org.apache.fop.image.analyser.ImageReaderFactory.make(ImageReaderFactory
.java:85)
at
org.apache.fop.image.ImageFactory.loadImage(ImageFactory.java:220)
at
org.apache.fop.image.ImageLoader.loadImage(ImageLoader.java:56)
at
org.apache.fop.image.ContextImageCache.getImage(ImageFactory.java:432)
at
org.apache.fop.image.ImageFactory.getImage(ImageFactory.java:157)
at
org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:68)
at org.apache.fop.fo.FObj.processNode(FObj.java:118)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder
.java:321)
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1072)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
Jun 9, 2007 5:21:38 PM org.apache.fop.image.ImageFactory
loadImage
SEVERE: Error while recovering image information () : null
java.lang.NullPointerException
at
org.apache.fop.image.analyser.XMLReader.verifySignature(XMLReader.java:6
6)
at
org.apache.fop.image.analyser.ImageReaderFactory.make(ImageReaderFactory
.java:85)
at
org.apache.fop.image.ImageFactory.loadImage(ImageFactory.java:220)
at
org.apache.fop.image.ImageLoader.loadImage(ImageLoader.java:56)
at
org.apache.fop.image.ContextImageCache.getImage(ImageFactory.java:432)
at
org.apache.fop.image.ImageFactory.getImage(ImageFactory.java:157)
at
org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:68)
at org.apache.fop.fo.FObj.processNode(FObj.java:118)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder
.java:321)
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1072)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
Jun 9, 2007 5:21:38 PM org.apache.fop.fo.flow.ExternalGraphic
bind
SEVERE: Image not available: url()
Jun 9, 2007 5:21:39 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234:
Error(13/11234): fo:block is not a valid child element of fo:root.
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
---------
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234:
Error(13/11234): fo:block is not a valid child element of fo:root.
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:501)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
Caused by: org.apache.fop.fo.ValidationException:
file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234:
Error(13/11234): fo:block is not a valid child element of fo:root.
at
org.apache.fop.fo.FONode.invalidChildError(FONode.java:393)
at
org.apache.fop.fo.FONode.invalidChildError(FONode.java:378)
at
org.apache.fop.fo.pagination.Root.validateChildNode(Root.java:127)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder
.java:303)
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1072)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:484)
... 4 more
---------
org.apache.fop.fo.ValidationException:
file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234:
Error(13/11234): fo:block is not a valid child element of fo:root.
at
org.apache.fop.fo.FONode.invalidChildError(FONode.java:393)
at
org.apache.fop.fo.FONode.invalidChildError(FONode.java:378)
at
org.apache.fop.fo.pagination.Root.validateChildNode(Root.java:127)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder
.java:303)
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1072)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail:
docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org
--
View this message in context: http://www.nabble.com/trouble-using-FOP-to-process-FO-file-generated-by-Xalan-or-Saxon-tf3895977.html#a12865829
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: [docbook-apps] trouble using FOP to process FO file generated by Xalan or Saxon
Posted by Jeff Powanda <jp...@vocera.com>.
One follow-up comment about using Xerces XML parser
(http://xerces.apache.org/xerces2-j/) with Saxon or Xalan. The latest
version of Xerces (2.9.0) fully supports XML inclusions (XInclude),
including XPointer syntax.
Regards,
Jeff Powanda
________________________________
From: Jeff Powanda
Sent: Sunday, June 10, 2007 11:14 PM
To: 'fop-users@xmlgraphics.apache.org';
docbook-apps@lists.oasis-open.org
Subject: RE: [docbook-apps] trouble using FOP to process FO file
generated by Xalan or Saxon
Thanks, Bob! I followed your instructions and can now process my
documents with xsltproc, Saxon, or Xalan. I appreciate your help.
Regards,
Jeff Powanda
________________________________
From: Bob Stayton [mailto:bobs@sagehill.net]
Sent: Saturday, June 09, 2007 7:36 PM
To: Jeff Powanda; docbook-apps@lists.oasis-open.org;
fop-users@xmlgraphics.apache.org
Subject: Re: [docbook-apps] trouble using FOP to process FO file
generated by Xalan or Saxon
Hi Jeff,
The XIncludes in your XML file are not resolving. That leaves your book
improperly stuctured, leading to improperly structured FO output. You
should have seen an error message from the stylesheet about not having a
template that matches "xi:include".
You need to set up either Saxon or Xalan with a recent version of Xerces
parser and with the XInclude option turned on. See this section in my
book:
http://www.sagehill.net/docbookxsl/Xinclude.html#JavaXIncludes
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: Jeff Powanda <ma...@vocera.com>
To: docbook-apps@lists.oasis-open.org ;
fop-users@xmlgraphics.apache.org
Sent: Saturday, June 09, 2007 5:34 PM
Subject: [docbook-apps] trouble using FOP to process FO file
generated by Xalan or Saxon
I was using xsltproc as my XSLT processor, but it ran out of
memory on a large book, so I decided to try Xalan and Saxon to convert a
test book. I set up Xalan and Saxon according to the instructions in Bob
Stayton's book, DocBook XSL: The Definitive Guide
(http://www.sagehill.net/docbookxsl/index.html). However, when I try to
use FOP 0.93 to convert either of the attached FO files, it reports the
following exception:
org.xml.sax.SAXParseException: Content is not allowed in prolog.
I pasted full output of the exception below.
Has anyone else experienced this problem? Please take a look at
the attached FO files and tell me what's wrong.
Regards,
Jeff Powanda
[Fatal Error] :1:1: Content is not allowed in prolog.
Jun 9, 2007 5:21:38 PM org.apache.fop.image.analyser.XMLReader
createDocument
WARNING: Error while constructing image from XML
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.DOMParser.parse(Unknown
Source)
at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at
org.apache.fop.image.analyser.XMLReader.createDocument(XMLReader.java:11
5)
at
org.apache.fop.image.analyser.XMLReader.loadImage(XMLReader.java:95)
at
org.apache.fop.image.analyser.XMLReader.verifySignature(XMLReader.java:6
5)
at
org.apache.fop.image.analyser.ImageReaderFactory.make(ImageReaderFactory
.java:85)
at
org.apache.fop.image.ImageFactory.loadImage(ImageFactory.java:220)
at
org.apache.fop.image.ImageLoader.loadImage(ImageLoader.java:56)
at
org.apache.fop.image.ContextImageCache.getImage(ImageFactory.java:432)
at
org.apache.fop.image.ImageFactory.getImage(ImageFactory.java:157)
at
org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:68)
at org.apache.fop.fo.FObj.processNode(FObj.java:118)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder
.java:321)
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1072)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
Jun 9, 2007 5:21:38 PM org.apache.fop.image.ImageFactory
loadImage
SEVERE: Error while recovering image information () : null
java.lang.NullPointerException
at
org.apache.fop.image.analyser.XMLReader.verifySignature(XMLReader.java:6
6)
at
org.apache.fop.image.analyser.ImageReaderFactory.make(ImageReaderFactory
.java:85)
at
org.apache.fop.image.ImageFactory.loadImage(ImageFactory.java:220)
at
org.apache.fop.image.ImageLoader.loadImage(ImageLoader.java:56)
at
org.apache.fop.image.ContextImageCache.getImage(ImageFactory.java:432)
at
org.apache.fop.image.ImageFactory.getImage(ImageFactory.java:157)
at
org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:68)
at org.apache.fop.fo.FObj.processNode(FObj.java:118)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder
.java:321)
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1072)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
Jun 9, 2007 5:21:38 PM org.apache.fop.fo.flow.ExternalGraphic
bind
SEVERE: Image not available: url()
Jun 9, 2007 5:21:39 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234:
Error(13/11234): fo:block is not a valid child element of fo:root.
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
---------
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234:
Error(13/11234): fo:block is not a valid child element of fo:root.
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:501)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
Caused by: org.apache.fop.fo.ValidationException:
file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234:
Error(13/11234): fo:block is not a valid child element of fo:root.
at
org.apache.fop.fo.FONode.invalidChildError(FONode.java:393)
at
org.apache.fop.fo.FONode.invalidChildError(FONode.java:378)
at
org.apache.fop.fo.pagination.Root.validateChildNode(Root.java:127)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder
.java:303)
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1072)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:484)
... 4 more
---------
org.apache.fop.fo.ValidationException:
file:///c:/docs/40SP/xml/other/indextest/IndexTest.fo:13:11234:
Error(13/11234): fo:block is not a valid child element of fo:root.
at
org.apache.fop.fo.FONode.invalidChildError(FONode.java:393)
at
org.apache.fop.fo.FONode.invalidChildError(FONode.java:378)
at
org.apache.fop.fo.pagination.Root.validateChildNode(Root.java:127)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder
.java:303)
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1072)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)
________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail:
docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org