Hello all I found the cause of problem that turned the file 'corrupt'. In my application, I created the entry for manifest.xml as follows: === "META-INF" + File.separator + "manifest.xml" === On a Windows machine, this gives "META-INF\manifest.xml" Looking at ZipEntry for the manifest.xml of the correct document, I saw that it was saved as "META-INF/manifest.xml". So I changed the code to create the entry with slash instead of backslash. And voila, the document created after opens without any complaints. Thanks for your responses. They pointed me to the right direction. Mathias: shall I still file an issue, to document the problem and it's solution? Regards Benno
________________________________ From: Mathias Bauer [mailto:[EMAIL PROTECTED] Sent: Thu 8/30/2007 9:17 AM To: [email protected] Subject: Re: [dev] ODT file created through XSL transformation is corrupt Luthiger Stoll Benno wrote: > Hello > > Thanks for your responses. > Concerning the mimetype entry: >> ... it doesn't look like it is the first stream ... > What does this mean? Do I have to write the JarEntry for the mimetype as > first entry written to the output file? If that can guarantee that this stream is put at the very beginning of all streams in the zip: yes. > I've tried that but that doesn't help. > Additionally, that doesn't explain the phenomenon that unzipping and > zipping the file fixes the corrupt document by magic.> > Here's the content of mimetype entry of the corrupt document: > ====== > application/vnd.oasis.opendocument.text > ====== Looks fine. > And here the content of the manifest.xml: > ====== > <?xml version="1.0" encoding="UTF-8"?> > <manifest:manifest > xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"> > <manifest:file-entry > manifest:media-type="application/vnd.oasis.opendocument.text" > manifest:full-path="/"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Configurations2/statusbar/"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Configurations2/accelerator/current.xml"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Configurations2/accelerator/"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Configurations2/floater/"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Configurations2/popupmenu/"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Configurations2/progressbar/"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Configurations2/menubar/"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Configurations2/toolbar/"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Configurations2/images/Bitmaps/"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Configurations2/images/"/> > <manifest:file-entry > manifest:media-type="application/vnd.sun.xml.ui.configuration" > manifest:full-path="Configurations2/"/> > <manifest:file-entry manifest:media-type="text/xml" > manifest:full-path="content.xml"/> > <manifest:file-entry manifest:media-type="text/xml" > manifest:full-path="styles.xml"/> > <manifest:file-entry manifest:media-type="text/xml" > manifest:full-path="meta.xml"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Thumbnails/thumbnail.png"/> > <manifest:file-entry manifest:media-type="" > manifest:full-path="Thumbnails/"/> > <manifest:file-entry manifest:media-type="text/xml" > manifest:full-path="settings.xml"/> > </manifest:manifest> > ====== Looks fine also. The problem looks interesting. :-) Please file an issues, attach a "naughty" file and assign the issues to "mav". 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
