On 4 juin 12, at 21:43, Dan Lewis 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.
I'm not too sure I'm understanding the question so I'll describe exactly what we are doing: we have an internal representation in a tool that includes some text with style information, mainly paragraph style names. To export the document, we create a text document in LO or any other OOo-based software, and ask to use it as a kind of template. The document is supposed to contain paragraph styles with the same names as the ones referenced in our tool. That document is correct, since it has been created by LO itself, and is not reported as corrupt at all. For the document I sent out, we of course made sure all styles were correctly defined (they are, as they appear correctly after the document is repaired).
Then our tool unzips the LO document, opens its content.xml file and gets some bits in it (mainly the header and the <office:font-face- decls> and <text:sequence-decls> blocks) and creates a new content.xml file, copying the bits into it with default values for the other parts. Then it writes the contents itself, with regular <text:p>, <text:h>, <text:list> tags. This writing is done 'manually', i.e with equivalent of printf's. We're basically sure the document structure is correct, since it opens without problem in previous versions. And we used a few XML validating tools on it, and no errors were reported at all.
For the other files in the .odt, they are basically kept as in the original document, so they are coming from LO itself. The only thing is that we are only copying the files styles.xml, mimetype, meta.xml, settings.xml and the whole contents of the META-INF directory. This used to work in former version.
Hope this is clearer now, and thanks again for your answer. -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