Luthiger Stoll Benno wrote:

> Hello
> 
> I have developed a Java application that holds data in XML and prints this 
> data into an OpenOffice.odt file using XSL transformation. Unfortunately, 
> when I open the created file, the message "The file 'xyz.odt' is corrupt and 
> therefore cannot be opened. Should OpenOffice.org repair the file?" pops up. 
> If I choose repair, the document is displayed exactely as expected.
> If I unzip the created file, I don't see anything that could be corrupt. The 
> astonishing thing is that I can unzip the created file and Zip it again and 
> now, the document is displayed in the OpenOffice writer WITHOUT corruption 
> message.
> 
> When I compare both files, the allegedly corrupt one and the one after the 
> unzip-zip procedure, I see that the content of both files looks exactly the 
> same, e.g.:
> Name                    type            size        ratio             path
> content.xml          XML         9'690        75%
> meta.xml              XML            915         61%
> mimetype             File                      39          0%
> styles.xml            XML         19'711       88%
> manifest.xml        XML          1'886        83%    meta-inf\

First I miss the "mimetype" stream. OOo will always complain if it can't
detect the mimetype. I'm not sure if it insists on the stream but IIRC
this is only the first try. There should be a fallback to what is
written in the manifest.xml. Perhaps you can post it here (the one of
your generated file).

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to