[Solved] Format Error Discovered (Sub-Document Content)

Discuss setup / installation issues - Add a spell checker, Language pack?
Post Reply
Nicky
Posts: 2
Joined: Thu Sep 10, 2015 5:26 am

[Solved] Format Error Discovered (Sub-Document Content)

Post by Nicky »

I know I'm not the first person to have this problem, but the solutions/advice I found were all dated from 2008 and either the solutions listed therein no longer work on modern software, or I simply didn't understand them well enough to implement them. I did try downloading EditPad Pro but could not fix the error that way. I'm sorry. If anyone can fix this document for me, I will be eternally grateful! It's due today, and I thought I'd finished with a few hours to spare, but when I tried to re-open the file to make sure I'd polished everything properly...well, I got this instead:

"Format Error Discovered in the File in Sub-Document Content.xml at 2,3966 (row,col)"

If anyone can either fix it, or tell me what to do to fix it, please I'm desperate! Thank you!
Last edited by Hagar Delest on Fri Sep 11, 2015 10:20 pm, edited 1 time in total.
Reason: tagged [Solved].
Open Office 4.1.1 on Windows 7
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-Document Cont

Post by acknak »

Try this one (attached below).

The problem occurs due to a bug in the current version of AOO; the bug is triggered when a comment is attached to a range of text instead of just a single point. The problem may reappear as long as the document contains such comments.

[attached file deleted]
 Edit: PS: 
The problem is in the first style:style tag. Remove all the office:name attributes; they're not supposed to be there.
AOO4/LO5 • Linux • Fedora 23
Nicky
Posts: 2
Joined: Thu Sep 10, 2015 5:26 am

Re: Format Error Discovered in the File in Sub-Document Cont

Post by Nicky »

Thank you so much! That one opens without any problems. Thank you!
Open Office 4.1.1 on Windows 7
markuse
Posts: 1
Joined: Wed Oct 07, 2015 7:40 pm

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by markuse »

Hi acknack, I'm having the same problem. I've been trying to solve it myself but having a hard time getting a hold on an xml parser for mac. Any tips? I didn't understand what you wrote about removing office:name attributes.

file is attached

thanks
Attachments
Owens proposal DAAD (1).odt
(48.17 KiB) Downloaded 269 times
Open Office 4.1.1 on MacOS 10.10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by acknak »

... Any tips? I didn't understand what you wrote about removing office:name attributes.
I'm sure there are xml editors for MacOS but it's not absolutely necessary to use anything beyond a text editor. I use emacs, which bundles an xml parser/edting mode (at least the Fedora package does). I can't really recommend it for casual use, though.

Near the top of content.xml, there are style definitions (inside a style:style tag) any office:name="..." attributes in there should be removed: they should not be there and if there is more than one, an error is triggered. So the simple fix is to remove them all--but ONLY inside the style:style section.

Try this one:
Attachments
OP_recovered.odt
(49.3 KiB) Downloaded 290 times
AOO4/LO5 • Linux • Fedora 23
mikevoets@gmail.com
Posts: 2
Joined: Tue Feb 02, 2016 6:00 am

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by mikevoets@gmail.com »

Hello,

After hours of attempts including, text editors, I am at an impasse.

Document spontaneously closed and tried to recover. Then was un-openable. This happened shortly after upgrading to to 4.1.2. Document was originally MSWord, did have comments, and previously saved as OO (4.1.1)

Any help or direction would be greatly appreciated.
Attachments
MICHAEL.odt
(46.22 KiB) Downloaded 244 times
Michael
Open office 4.2.2 Windows 7
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by RoryOF »

Try this. Error was something to do with a multiply repeated annotation.
Attachments
MICHAEL fixed.odt
(45.2 KiB) Downloaded 205 times
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
mikevoets@gmail.com
Posts: 2
Joined: Tue Feb 02, 2016 6:00 am

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by mikevoets@gmail.com »

RoryDF,

Much gratitude. All good. I will find a way to pass your assistance forward. :-)

Thank you!

Michael
Michael
Open office 4.2.2 Windows 7
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by RoryOF »

In correcting a file error like this we can only hack away what appears to be causing the error. We have no knowledge if we are cutting more than we should, so be sure to check the last amendments made before OpenOffice reported the file as damaged - they may have been removed or be incomplete.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
lalithr312
Posts: 56
Joined: Mon Jun 22, 2015 12:07 am

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by lalithr312 »

acknak wrote:
... Any tips? I didn't understand what you wrote about removing office:name attributes.
I'm sure there are xml editors for MacOS but it's not absolutely necessary to use anything beyond a text editor. I use emacs, which bundles an xml parser/edting mode (at least the Fedora package does). I can't really recommend it for casual use, though.

Near the top of content.xml, there are style definitions (inside a style:style tag) any office:name="..." attributes in there should be removed: they should not be there and if there is more than one, an error is triggered. So the simple fix is to remove them all--but ONLY inside the style:style section.

Try this one:
acknak,

I opened the files using Notepad++, and I can't find any attributes with the name office:name.
There are a couple of references to content.xml (one in the middle of the file and one at the end), but other than that, I'm getting random characters.
OpenOffice 4.1.1 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by RoryOF »

Acknak's reply referred to the first file attached in this thread. In the case of the later file Michael.odt there were multiple copies of the same annotation, which XML Copy Editor located.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
lalithr312
Posts: 56
Joined: Mon Jun 22, 2015 12:07 am

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by lalithr312 »

RoryOF wrote:Acknak's reply referred to the first file attached in this thread. In the case of the later file Michael.odt there were multiple copies of the same annotation, which XML Copy Editor located.
OK, I did some searching on Bugzilla, and I found out you need to open the files using 7zip. I can read content.xml now, and it doesn't appear as random characters. Thanks, Regina.
OpenOffice 4.1.1 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by RoryOF »

Having opened the archive that is an OpenOffice file, one can then extract (or otherwise access) content.xml. This will display (but not edit) in an internet browser, in a plain text editor or in a dedicated XML editor. I use XML Copy Editor to inspect the content.xml file and make whatever correction the XML editor suggests, then repackage back into the archive. Note that sometimes the indicated error can be caused by spurious code immediately before the location indicated - one has to use a little discretion on one's corrections.
.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
ints221
Posts: 1
Joined: Sun May 08, 2016 7:18 pm

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by ints221 »

I have the same issue - keep getting the format error. I`ve been trying to solve this myself, but being not the most code-literate person I`m having difficulties. Tried using 7zip to read content.xml, but page could not been open. I`ve uploaded the document and would be extremely grateful if someone could help me with this, my BA degree is riding on that.
Thanks to anyone who`d be so kind to look into this!
Attachments
Noored%20maatöödel%20juhendaja%20märkustega%2007.05.odt_1.odt
(83.88 KiB) Downloaded 188 times
OpenOffice 4.1 on Windows 10 Home
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by RoryOF »

Try this version - there may be a slight format change somewhere in it.
Attachments
Repaired Noored%20maatöödel%20juhendaja%20märkustega%2007.05.odt_1.odt
(81.28 KiB) Downloaded 177 times
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Netta1900
Posts: 3
Joined: Wed Aug 16, 2017 6:30 pm

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by Netta1900 »

Not sure if I can pos as here
But desperate;y need help
Have same problem on thsi file
Attachments
IQA-05 - ASA reply 1708.odt
(39.75 KiB) Downloaded 168 times
Open Office 4.1.3/ Mac OS Sierra
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by RoryOF »

This document has been repaired in the thread that contains your other posting.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
utilizator
Posts: 4
Joined: Tue Jun 26, 2018 4:35 pm

Re: [Solved] Format Error Discovered (Sub-Document Content)

Post by utilizator »

I have tha same problem can anyone help me to repaird my file ?

I can upload on my server.
Windows 7 Ultimate 64 b
OpenOffice 4.1.5
Post Reply