[Solved] Corrupted file (SAXParseException error)

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
a1ro
Posts: 4
Joined: Sun Jan 20, 2019 9:55 pm

[Solved] Corrupted file (SAXParseException error)

Post by a1ro »

Good day. I can not open the file in LibreOffice. It gives an error with the following content:
SAXParseException: "No namespace defined for pic"
SAXParseException: '{word / document.xml line 20}: Namespace prefix pic on bodyPr is not defined
Stream 'word / document.xml', Line 20, Colum 23379
Please help restore the document. Writing language: Russian.

My file https://yadi.sk/d/rtY0wo2FRVWbrw
Last edited by Hagar Delest on Mon Jan 21, 2019 10:35 pm, edited 1 time in total.
Reason: tagged solved
OpenOffice 3.1
User avatar
Lupp
Volunteer
Posts: 3542
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Corrupted file (SAXParseException error)

Post by Lupp »

You posted the question in the LibreOffice branch, but your signature tells you are using OpenOffice.org V 3.1.
This is inconsistent. In addition OOo V 3.1 is very old. I don't think it ever claimed to be able to work with docx.

The document you attached is in MS(TM)-docx representation. Was it created with MS-Office? If so an MS forum might be the correct place for the thread. If not: Always use the internationally approved odf formats to save LibreOffice/Apache OpenOffice/OpenOffice.org documents.

Did you already check the result you get if you ignore the error?

What I got with LibO V 6.2.0.0beta1 ignoring the error you find here: http://www.psilosoph.de/FreeOfficeForum ... gnored.odt. There may a graphical object be missing.

I don't know enough about docx to help you beyond this. Trying to locate the problem in the wrapped-in document.xml I failed due to my lack of knowledge.
Last edited by Lupp on Mon Jan 21, 2019 12:25 am, edited 1 time in total.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted file (SAXParseException error)

Post by RoryOF »

Lupp's result (linked above) is very close to what I got using a different method to Lupp. I doubt you will get anything better.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Corrupted file (SAXParseException error)

Post by John_Ha »

Having examined the file it appears this is the normal type of error where all the user content before the error is displayed OK. However, all the user content following the error, even well formed content, is not displayed even though it is still present in the document.xml file.

I think the error has been caused by LO when writing a .docx file.

The last word displayed in the corrupted file is "Схема:"

When I pretty printed document.xml I got an XML parsing error at line 18625 "Namespace prefix pic on bodyPr is not defined". I do not know what that means nor how to fix it. Had I been able to fix it I think the file would then have opened. There have been other posts - see search on namespace prefix

Very soon after "Схема:" a <mc:AlternateContent> tag appears which means what follows is not part of the OOXML standard. The error causing the problem is within the AlternateContent about 120 lines later. The AlternateContent is probably an MS Textbox.
cxema.gif
error.gif
The only thing I could do was strip all the XML tags to recover all the user text in the file. It is completely unformatted but it does have all the user text. If you want the images just unzip the .odt file and look in the media folder.

NB This file is complicated by having an MS Textbox (an MS Textbox is part of MS Draw). LO supports and displays MS Textboxes and their content but AOO neither supports nor displays MS Textboxes. Hence, regardless of the error, AOO would never have displayed anything between the <mc:AlternateContent> and the </mc:AlternateContent> tags.

See [Tutorial] Differences between Writer and MS Word files for why you should always work in and save files as .odt.
Attachments
recovered text.odt
(56.14 KiB) Downloaded 327 times
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
a1ro
Posts: 4
Joined: Sun Jan 20, 2019 9:55 pm

Re: Corrupted file (SAXParseException error)

Post by a1ro »

Many thanks to all who responded.
"John_Ha" you helped me a lot!
OpenOffice 3.1
User avatar
Lupp
Volunteer
Posts: 3542
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Corrupted file (SAXParseException error)

Post by Lupp »

I probably got a bit more repaired. Check the linked file to find out. Of course, there are still missing a few objects, but text (56 pages), structure, and formatting should widely be preserved.
http://www.psilosoph.de/FreeOfficeForum ... tegory.odt

Please tell me if I shall remove the files (the one linked here and the one linked yesterday) from public access.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
a1ro
Posts: 4
Joined: Sun Jan 20, 2019 9:55 pm

Re: Corrupted file (SAXParseException error)

Post by a1ro »

Lupp, thank you so much! The document looks like the original. Thanks again to all those who responded!
OpenOffice 3.1
Post Reply