[Solved] Read-error format error discovered in sub-document styles.xml

Discuss the word processor
Locked
bmeirose
Posts: 4
Joined: Wed Jun 15, 2022 3:08 pm

[Solved] Read-error format error discovered in sub-document styles.xml

Post by bmeirose »

Hi,

I have a very similar problem as described here: https://forum.openoffice.org/en/forum/v ... 7&t=107560, that is I have a corrupted file with this xml-type error.

Opening with a xml editor did not work at all. The file is unfortunately too large to be attached to the forum, so i wonder if there are any suggestions. In here:

https://forum.openoffice.org/en/forum/v ... 2&start=30

I see that one might be able to fix this by editing externally, but I haven't found any tools that allow me to do that.

Thanks

 Edit: Changed subject, was [Solved] Read-error format error discovered in sub-document content.xml 
Make your post understandable by others 
-- MrProgrammer, forum moderator 
Last edited by MrProgrammer on Fri Jun 17, 2022 4:12 am, edited 3 times in total.
Reason: Changed subject, since XML file name was incorrect
Bernhard Meirose, Open Office 4.1.1
User avatar
RoryOF
Moderator
Posts: 35078
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Read-error format error discovered in the file in sub-document content.xml at 286401 (row,col)"

Post by RoryOF »

Keep an unmodified copy of the damaged file; work only on a copy. You could upload to a file-sharing site and post the URL here.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
bmeirose
Posts: 4
Joined: Wed Jun 15, 2022 3:08 pm

Re: Read-error format error discovered in the file in sub-document content.xml at 286401 (row,col)"

Post by bmeirose »

OK, Thanks. Here's the file:

https://wetransfer.com/downloads/60c687 ... ient_email
 Edit: 2022-08-06 link above is broken -- MrProgrammer, forum moderator  
Last edited by MrProgrammer on Sun Aug 07, 2022 4:09 am, edited 1 time in total.
Reason: Noted broken link
Bernhard Meirose, Open Office 4.1.1
User avatar
RoryOF
Moderator
Posts: 35078
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Read-error format error discovered in the file in sub-document content.xml at 286401 (row,col)"

Post by RoryOF »

Am trying to send repaired file by email - check last three or four slides - I had to delete a faulty tag around about there.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
User avatar
RoryOF
Moderator
Posts: 35078
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Read-error format error discovered in the file in sub-document content.xml at 286401 (row,col)"

Post by RoryOF »

Please let me know if you receive the file by email; otherwise I'll send it differently.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
bmeirose
Posts: 4
Joined: Wed Jun 15, 2022 3:08 pm

Re: Read-error format error discovered in the file in sub-document content.xml at 286401 (row,col)"

Post by bmeirose »

I unfortunately didn't receive the file. Thanks!
Bernhard Meirose, Open Office 4.1.1
User avatar
MrProgrammer
Moderator
Posts: 5296
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Read-error format error discovered in the file in sub-document content.xml at 286401 (row,col)"

Post by MrProgrammer »

bmeirose wrote: Wed Jun 15, 2022 3:32 pm Read-error format error discovered in sub-document content.xml
I see that one might be able to fix this by editing externally, but I haven't found any tools that allow me to do that.
I used unzip on the file you sent. I don't see a problem in content.xml. The trouble is in styles.xml which is just a plain Unicode (UTF-8) text file. The attribute draw:mirror-vertical is specified twice in the draw:enhanced-geometry tag. You need to delete one of the pair. I suspect the "false" setting is correct, but you can experiment. Make a copy of your file before attempting repair, of course. This is the section you need to fix:

<draw:enhanced-geometry
      draw:mirror-horizontal="false"
      draw:mirror-vertical="false"
      svg:viewBox="0 0 0 0"
      draw:text-areas="0 0 ?f3 ?f2"
      draw:mirror-vertical="true"
      draw:type="ooxml-rect"
      draw:enhanced-path="M 0 0 L ?f3 0 ?f3 ?f2 0 ?f2 Z N"
>
   <draw:equation draw:name="f0" draw:formula="logwidth/2" />
   <draw:equation draw:name="f1" draw:formula="logheight/2" />
   <draw:equation draw:name="f2" draw:formula="logheight" />
   <draw:equation draw:name="f3" draw:formula="logwidth" />
</draw:enhanced-geometry>

I can't provide more specific instructions since you do not say which operating system you use.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.6, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
RoryOF
Moderator
Posts: 35078
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Read-error format error discovered in the file in sub-document content.xml at 286401 (row,col)"

Post by RoryOF »

Attached is the repaired styles.xml; replace this into your damaged file and all should be well
Attachments
styles.xml
(96.75 KiB) Downloaded 171 times
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
bmeirose
Posts: 4
Joined: Wed Jun 15, 2022 3:08 pm

Re: Read-error format error discovered in sub-document content.xml

Post by bmeirose »

Thank you very much for the file. Problem solved.
Bernhard Meirose, Open Office 4.1.1
Locked