Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Correction:

The required manifest:version="1.2" is required, for ODF 1.2 documents, on the <manifest:manifest> 
element (the root of META-INF/manifest.xml> and on the <manifest:file-entry> having 
manifest:full-path="/".

Also, double-check all places where MIME Type strings are expressed, including in the mimetype file 
of the package.  There should be no ",", ";" or whitespace characters in the content values.

 - [;<).

-----Original Message-----
From: Dennis E. Hamilton [mailto:dennis.hamilton@acm.org] 
Sent: Wednesday, June 06, 2012 08:50
To: users@global.libreoffice.org
Subject: RE: [libreoffice-users] Document 'corrupt' for LibreOffice, opens fine with other 
OOo-based software [SOLVED!]

Hmm,

The META-INF/manifest.xml file does require a <manifest:file-entry> element that has 
manifest:full-path="/".  It also requires a manifest:media-type attribute whose value matches the 
string in the package's mimetype.  E.g., 
manifest:media-type="application/vnd.oasis.opendocument.text".

In addition, but only for an ODF 1.2 document, there should be a manifest:version="1.2" on that 
<manifest:file-entry> element and also on the <manifest:file-entry> for the content.xml part.  (In 
that case, there must be office:version="1.2" attributes on the root elements of content.xml, 
styles.xml, and meta.xml I believe.  Check whether these are on the versions of the file that are 
not reported as corrupted and follow suit.

Finally, how are you producing the mimetype in the Zip package?  It might be better to let LO do 
that.

 - Dennis

-----Original Message-----
From: Eric Brunel [mailto:eric.brunel@pragmadev.com] 
Sent: Wednesday, June 06, 2012 05:36
To: users@global.libreoffice.org
Subject: Re: [libreoffice-users] Document 'corrupt' for LibreOffice, opens fine with other 
OOo-based software [SOLVED!]

On 6 juin 12, at 09:58, Eric Brunel wrote:
On 6 juin 12, at 03:07, TomW wrote:

At http://odf-validator.rhcloud.com/, the original file fails:

Ah! Now that's what I needed. Didn't know this service existed, this  
will help a lot! Thank you very much for the pointer.

The document is NOT conformant ODF1.0!

Details:

doctest.odt/META-INF/manifest.xml: Error: The file 'Configurations2/ 
accelerator/current.xml' shall not be listed in the 'META-INF/ 
manifest.xml' file as it does not exist in the ODF package  
'doctest.odt'!
doctest.odt/META-INF/manifest.xml: Error: The file 'Thumbnails/ 
thumbnail.png' shall not be listed in the 'META-INF/manifest.xml'  
file as it does not exist in the ODF package 'doctest.odt'!
doctest.odt: Info: Generator: OpenOffice.org/2.0$Linux  
OpenOffice.org_project/680m1$Build-8990

OK, I've been changing the manifest.xml file to reference only the  
files that actually were in the document and it got better. But now  
I have an error that I don't understand:

doctest-bis.odt/mimetype: Error: There shall be no extra field for  
the 'mimetype' file of ODF package 'doctest-bis.odt'!

What does that mean? The contents for the mimetype file is just:
application/vnd.oasis.opendocument.text
What's wrong with that? Or is the error elsewhere?

BUT: the document now opens in LO 3.5.4 without being reported as  
corrupt! So, I guess the problem is solved, even if I'd like to know  
anyway what the error above means.

For the record, here is what I had to do:
Put the mimetype file in the archive at the first position. This seems  
to be mandatory in any ODF file.
Delete the settings.xml file from the archive, as it seems it is not  
really needed and can cause some problems.
Write a correct META-INF/manifest.xml file, referencing exactly all  
the files in the archive and no other.
Make sure all opening tags for all XML documents included the same ODF  
version. That was quite easy in my case, since I just had to copy the  
version from the template document.
With all this, the document opens without problem in all versions of  
all OOo-based software we could test (including LO 3.5.4, IBM Lotus  
Symphony 3.0.0 FP2 and OOo 3.1.1).

Looking back at it, it is actually quite surprising the former  
versions opened the file without any warning, since the META-INF/ 
manifest.xml file in it was completely wrong. The newer versions  
really seem to do the right thing here.

Thanks a lot again to all who answered.
  - Eric -


-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.