xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pascal Sancho (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FOP-2513) First element must be the fo:root formatting object
Date Mon, 17 Aug 2015 07:04:46 GMT

    [ https://issues.apache.org/jira/browse/FOP-2513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14699095#comment-14699095
] 

Pascal Sancho commented on FOP-2513:
------------------------------------

I guess you fed FOP directly with your XML.
FOP expects XSL-FO as input.
As a convenience, FOP dist provides Xalan, an XSLT engine, letting you to feed FOP with both
XML and XSLT; this transformation is completed before feeding FOP internally with the resulting
XSL-FO.

If I guess wrong, please give further info, if I'm right, please close the issue.

> First element must be the fo:root formatting object
> ---------------------------------------------------
>
>                 Key: FOP-2513
>                 URL: https://issues.apache.org/jira/browse/FOP-2513
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Mathieu Malaterre
>
> With:
> $ cat in.xml                                                                        
                                                                      /tmp
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
> <article>
>   <articleinfo>
>     <title>title</title>
>     <author>
>       <firstname>author</firstname>
>       <surname>author2</surname>
>       <affiliation>
>         <orgname>bla</orgname>
>       </affiliation>
>     </author>
>     <pubdate>2001</pubdate>
>   </articleinfo>
>   <section>
>     <title>section 1</title>
>     <para>text section 1</para>
>     <figure>
>       <title>first</title>
>       <mediaobject>
>         <imageobject>
>           <imagedata fileref="openlogo-100.png"/>
>         </imageobject>
>       </mediaobject>
>     </figure>
>   </section>
> </article>
> and:
> $ wget http://www.debian.org/logos/openlogo-100.png
> here is what I get:
> $ fop in.xml in.pdf
> [ERROR] FOP - Exception <org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException:
First element must be the fo:root formatting object. Found (Namespace URI: "", Local Name:
"article") instead. Please make sure you're producing a valid XSL-FO document.
> javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: First
element must be the fo:root formatting object. Found (Namespace URI: "", Local Name: "article")
instead. Please make sure you're producing a valid XSL-FO document.>org.apache.fop.apps.FOPException:
org.apache.fop.fo.ValidationException: First element must be the fo:root formatting object.
Found (Namespace URI: "", Local Name: "article") instead. Please make sure you're producing
a valid XSL-FO document.
> javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: First
element must be the fo:root formatting object. Found (Namespace URI: "", Local Name: "article")
instead. Please make sure you're producing a valid XSL-FO document.
> 	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:288)
> 	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
> 	at org.apache.fop.cli.Main.startFOP(Main.java:186)
> 	at org.apache.fop.cli.Main.main(Main.java:217)
> Caused by: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException:
First element must be the fo:root formatting object. Found (Namespace URI: "", Local Name:
"article") instead. Please make sure you're producing a valid XSL-FO document.
> 	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
> 	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:285)
> 	... 3 more
> Caused by: org.apache.fop.fo.ValidationException: First element must be the fo:root formatting
object. Found (Namespace URI: "", Local Name: "article") instead. Please make sure you're
producing a valid XSL-FO document.
> 	at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
> 	at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58)
> 	at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
> 	at com.sun.proxy.$Proxy0.invalidFORoot(Unknown Source)
> 	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:269)
> 	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
> 	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
> 	at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> 	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
> 	... 4 more
> ---------
> javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: First
element must be the fo:root formatting object. Found (Namespace URI: "", Local Name: "article")
instead. Please make sure you're producing a valid XSL-FO document.
> 	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
> 	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:285)
> 	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
> 	at org.apache.fop.cli.Main.startFOP(Main.java:186)
> 	at org.apache.fop.cli.Main.main(Main.java:217)
> Caused by: org.apache.fop.fo.ValidationException: First element must be the fo:root formatting
object. Found (Namespace URI: "", Local Name: "article") instead. Please make sure you're
producing a valid XSL-FO document.
> 	at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
> 	at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58)
> 	at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
> 	at com.sun.proxy.$Proxy0.invalidFORoot(Unknown Source)
> 	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:269)
> 	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
> 	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
> 	at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> 	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
> 	... 4 more
> ---------
> org.apache.fop.fo.ValidationException: First element must be the fo:root formatting object.
Found (Namespace URI: "", Local Name: "article") instead. Please make sure you're producing
a valid XSL-FO document.
> 	at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38)
> 	at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58)
> 	at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
> 	at com.sun.proxy.$Proxy0.invalidFORoot(Unknown Source)
> 	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:269)
> 	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
> 	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
> 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> 	at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
> 	at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> 	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
> 	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:285)
> 	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
> 	at org.apache.fop.cli.Main.startFOP(Main.java:186)
> 	at org.apache.fop.cli.Main.main(Main.java:217)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message