[Solved] Format error discovered in sub-doc. styles.xml

Discuss the presentation application

[Solved] Format error discovered in sub-doc. styles.xml

Postby laulas » Thu Oct 13, 2016 1:28 pm

Hello,

I am new in this forum, thank you all for providing your help!

I have a problem with an .ODP file: yesterday I copied and pasted an .OTP template file,
so I created the content and saved it as .ODP.

I closed and opened the file and I had this message:

"Format error discovered in the file in sub-document styles.xml, line 2...."

Here is the link to my style.xml file:
https://gist.github.com/anonymous/c3cb6 ... 60f515d97e

I tried many of the solutions from this forum and over the web, nothing works!
I don't really know what to do!!

Do you have any suggestion?
Last edited by RoryOF on Thu Oct 13, 2016 2:50 pm, edited 1 time in total.
Reason: Added [Solved] and green tick [RoryOF, Moderator]
OpenOffice 4.1.2 - Windows 10 and Ubuntu 16.04
laulas
 
Posts: 3
Joined: Thu Oct 13, 2016 12:16 pm

Re: Format error discovered in the file in sub-doc. styles.x

Postby acknak » Thu Oct 13, 2016 1:46 pm

Try this one (attached).

Note that the correct name for the file is styles.xml not style.xml.

There are three elements that have repeated draw:mirror-vertical attributes. I removed the ="true" instances and left the ="false" ones.
Attachments
styles_repaired.zip
(8.75 KiB) Downloaded 136 times
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Format error discovered in the file in sub-doc. styles.x

Postby laulas » Thu Oct 13, 2016 1:58 pm

Thank you acknak!

I still can't open the document.

I'm now working on Windows: I replaced your code in the styles.xml file
and compressed all with 7zip as a zip file, extended odp.
When I open the odp file, OpenOffice says:

"The file xxx.odp could not be repaired and therefore cannot be opened."

Am I zipping the file in the wrong way maybe?
OpenOffice 4.1.2 - Windows 10 and Ubuntu 16.04
laulas
 
Posts: 3
Joined: Thu Oct 13, 2016 12:16 pm

Re: Format error discovered in the file in sub-doc. styles.x

Postby RoryOF » Thu Oct 13, 2016 2:11 pm

I found a surer way to do this is to use an archive manager to open the main .odp file, then to edit the internal .xml file with a plain text editor. When I save that file the archive manager prompts to allow replacement of the .xml file within the archive and then rebuilds the archive. Other ways of replacing an .xml file in an archive seemed to give an incorrect checksum for the archive, resulting in a "could not be repaired" message.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29438
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Format error discovered in the file in sub-doc. styles.x

Postby acknak » Thu Oct 13, 2016 2:12 pm

The way I do it is, rather than zipping all the sub-files together to make a new document, instead take a working ODF file and use command-line zip to update the "styles.xml" component. That seems to work consistently.

If you're still having trouble, attach your document here and I can update it.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Format error discovered in the file in sub-doc. styles.x

Postby laulas » Thu Oct 13, 2016 2:35 pm

I don't really know how to thank you, IT WORKED!!!

Thanks a lot!!
OpenOffice 4.1.2 - Windows 10 and Ubuntu 16.04
laulas
 
Posts: 3
Joined: Thu Oct 13, 2016 12:16 pm


Return to Impress

Who is online

Users browsing this forum: No registered users and 4 guests