Eric Brunel wrote:
I need you to clear a point up for me. You did not say
what format the generated document is in. This might make a
difference. Also how did you generate the contents.xml file?
Perhaps these have a similar answer.
On 4 juin 12, at 14:58, Dan Lewis wrote:
I did some testing on the document you created. First I
downloaded the file, created a copy, and renamed the copy
from .odt to .zip (doctext.zip). Then I opened the
downloaded file with LO allowing it to repair the file.
Then I saved it (doctext(repaired).odt, created a copy of
it, and renamed it from .odt to .zip. I also opened the
two zipped files next to each other.
2.0kB 1.2 kB
bytes 767 bytes
kB 4.8 kB
kB 1.1 kB
bytes 39 bytes
kB 9.0 kB
kB 15.0 kB
I will let others draw their own conclusions as to
what this means.
This is exactly what I've been doing to try to create a
correct document myself. The problem is, I'm not really
sure what parts of the document I should change to prevent
it from being reported as corrupt. Some information in
these files do not look important at all, or not related
to the actual contents of the document. It seems that
there is some internal consistency problem between the
files, but since LO doesn't say anything else than 'the
document is corrupt', it's very hard to figure out what's
Then again, I have some questions and comments. Why
are you creating a document by only changing the
content.xml file? From the above information, clearly
other files needed to be changed as well. And as Andreas
pointed out, LO will report the error regardless of the
OS used on a computer.
Yes, we've been working on the matter a bit further and
figured out that too: it seems the latest versions of all
OOo-based software we could test on any platform do report
the document as corrupt. So I was hoping to figure out
what had changed between the versions that open it without
problem and the current ones to know what to do to
generate it correctly.
Will creating a template with the layout you want
work just as well or better? It can be used to open a new
document. Then you can enter or copy material into the
new document. When you save this, LO will update all the
files and folders within the ODT file.
Well, the problem is, as I said in my original post, the
document is generated, not created by hand. We have a
description of the document contents in an external
source, and we are using an existing ODF document only to
get the styles from it. So it did seem to be enough to get
all the files from the existing ODF document, replace the
contents.xml in it by the one we generate, and zip back
everything to a new ODF file. And it used to work, but it
doesn't anymore… But basically, we would like to be able
to generate the document without running LO at all. With
the method we're using, it doesn't even need to be
installed, and that's even better…
And by the way, if we open the existing ODF file (not the
generated one), everything works fine. LO doesn't say it's
corrupt and opens it without any problem.
Thanks a lot anyway to you and Andreas for your answers.
For unsubscribe instructions e-mail to: firstname.lastname@example.org
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
Impressum (Legal Info)
: 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