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 Adrian Sobotta <as...@hotmail.com> on 2004/03/17 10:40:38 UTC

root must be root element

Hi All,

I've got this strange error. I can reproduce it, but Im still a bit lost 
about how to fix it. Basically what Im doing is using the 
java\embedding\ExampleXML2FO.java to loop through an array which I pass it 
and generate a few hundred PDF's. All the PDF's are based on the same XSL 
file. They just differ by the images that are pulled in and the XML.

A summary of the problem though is that once I get a certain error, it fails 
on all subsequent iterations of the array even if the error was just 
associated with one of the XML files. As you can see the output below failed 
initially with the error 'There is not enough space on the disk', but my 
problem is that for every subsequent iteration of the loop it throws 
'javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
root must be root element' regardless of whether the space error is fixed or 
not.

Obviously running out of space is going to kill the process regardless.. 
however I also get this error every now and again for different reasons. One 
such reason is when it encounters an XML file which has more of a certain 
XML element which the XSL is using to construct a table, and the table ends 
up having more columns then are defined with <fo:table-column 
column-width="380px"/>.

So is it because theres some kind of cache of XML/XSL which isnt been 
cleared when an error occurs or something? Im a bit lost about whats going 
on.. any help would be greatly appriciated.


[INFO] building formatting object tree
[INFO] setting up fonts
[INFO] [1]
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[WARNING] Sum of fixed column widths 381825 greater than maximum specified 
IPD 381576
[WARNING] Sum of fixed column widths 381825 greater than maximum specified 
IPD 381576
[WARNING] Sum of fixed column widths 381825 greater than maximum specified 
IPD 381576
[WARNING] Sum of fixed column widths 381825 greater than maximum specified 
IPD 381576
[WARNING] Sum of fixed column widths 596691 greater than maximum specified 
IPD 595275
[ERROR] At least one of minimum, optimum, or maximum IPD must be specified 
on table.
[INFO] [1]
javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
There is not enough space on the disk

[INFO] ---- Generating PDF for FRM
[INFO] building formatting object tree
[INFO] setting up fonts
javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
root must be root element

[INFO] ---- Generating PDF for FRT
[INFO] building formatting object tree
[INFO] setting up fonts
javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
root must be root element

[INFO] ---- Generating PDF for FSA
[INFO] building formatting object tree
[INFO] setting up fonts
javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
root must be root element

[INFO] ---- Generating PDF for FSL
[INFO] building formatting object tree
[INFO] setting up fonts
javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
root must be root element

[INFO] ---- Generating PDF for FTR
[INFO] building formatting object tree
[INFO] setting up fonts
javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
root must be root element

_________________________________________________________________
Get Extra Storage in 10MB, 25MB, 50MB and 100MB options now! Go to  
http://join.msn.com/?pgmarket=en-au&page=hotmail/es2


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


Re: root must be root element

Posted by Chris Bowditch <bo...@hotmail.com>.
Adrian Sobotta wrote:

> Hi All,
> 
> I've got this strange error. I can reproduce it, but Im still a bit lost 
> about how to fix it. Basically what Im doing is using the 
> java\embedding\ExampleXML2FO.java to loop through an array which I pass 
> it and generate a few hundred PDF's. All the PDF's are based on the same 
> XSL file. They just differ by the images that are pulled in and the XML.
> 
> A summary of the problem though is that once I get a certain error, it 
> fails on all subsequent iterations of the array even if the error was 
> just associated with one of the XML files. As you can see the output 
> below failed initially with the error 'There is not enough space on the 
> disk', but my problem is that for every subsequent iteration of the loop 
> it throws 'javax.xml.transform.TransformerException: 
> org.apache.fop.apps.FOPException: root must be root element' regardless 
> of whether the space error is fixed or not.

I am wondering if this caching effect is because you are re-using the 
TransformerFactory or Transformer objects (which would make sense as 
your XSLT stylesheet doesnt change) I think you may need to change your 
error handling to reset a few things when one xml document fails.

It would also be helpful if you could post your code, I know you say its 
based on the example, but looking at the example wont help us to help you.

Chris


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