[Solved] Format error in sub-document content.xml

Discuss setup / installation issues - Add a spell checker, Language pack?
Post Reply
JR76
Posts: 4
Joined: Fri Dec 20, 2019 3:38 pm

[Solved] Format error in sub-document content.xml

Post by JR76 »

Hi

I like others that I've read about on the site have an error in the content.xml file when i try to open my .odg file.

I've followed the advice and from a zip archive looked at the file in notepad ++ and XML Copy Editor but I just dont understand XML enough to understand what the issue is. :?

My error when I try to open the drawing file is "Read-Error. Format error discovered in the file in sub-document content.xml at position 2, 3772(row,col).

Could someone kindly take a look at the file for me? Would be greatly appreciated.

Thanks
Jay
Last edited by RoryOF on Fri Dec 20, 2019 7:09 pm, edited 2 times in total.
Open Office 4.1.7
Windows 10
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Format error in sub-document content.xml

Post by RoryOF »

I've had a quick look; I think (may be wrong) that the element "style: graphic-properties" which is causing the problem may be a Microsoft addition, departing from the OpenDocument standard. After a quick inspection it seems to me to be a nonstandard usage.

Has this file been prepared or saved at some time by MS Office? If so,the quickest way will be to go back to MS Office to edit it.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
JR76
Posts: 4
Joined: Fri Dec 20, 2019 3:38 pm

Re: Format error in sub-document content.xml

Post by JR76 »

Thanks RoryOF

Good question. The guys that created it have since left the company so no idea how they prepared it.
Any advise you could offer on how would I edit it in MS Office?
Open Office 4.1.7
Windows 10
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Format error in sub-document content.xml

Post by RoryOF »

I haven't used MS Office in over ten years; current MS Office (any version 2007 and after) should open OpenDocument format files, with the caveat that MS have fiddled with their implementation to depart from the OpenDocument standard.

I found one query on Forum about the same element - XML validators didn't like it in that case, which suggests strongly that it is indeed an MS construct.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Format error in sub-document content.xml

Post by John_Ha »

Try this file which opens for me.

It seems that many style definitions were corrupted by the addition of ="evenodd" so I did the brute force and ignorance thing of deleting them to make the style definitions "look like" all the others.

Code: Select all

<style:graphic-properties ="evenodd" draw:stroke="none" draw:fill="gradient" draw:fill-gradient-name="Gradient_5f_11" draw:shadow="hidden"/>
</style:style>
...
<style:graphic-properties draw:stroke="none" draw:fill="none" draw:textarea-vertical-align="middle" fo:min-height="1.2cm" fo:min-width="2.54cm" fo:padding-top="0.141cm" fo:padding-bottom="0.141cm" fo:padding-left="0.141cm" fo:padding-right="0.141cm"/>
</style:style>
File removed for confidentiality -[RoryOF, Moderator]
File removed for confidentiality -[RoryOF, Moderator]
Showing that a problem has been solved helps others searching so, if your problem is now solved, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
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.
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Format error in sub-document content.xml

Post by RoryOF »

I saw the "evenodd" but didn't like to adjust (read: delete) it without more knowledge of its correct syntax.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Format error in sub-document content.xml

Post by John_Ha »

RoryOF wrote:I saw the "evenodd" but didn't like to adjust (read: delete) it without more knowledge of its correct syntax.
Rory

That's where the "brute force and (especially) ignorance" bit comes in ...
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.
JR76
Posts: 4
Joined: Fri Dec 20, 2019 3:38 pm

Re: Format error in sub-document content.xml

Post by JR76 »

Hi Both

Thats great!! :super: :bravo:

I've downloaded the file and can see it now. It will come in very useful for a project I'm working on instead of me creating it all again from scratch.

Would you advise that I only open this file with OpenOffice to prevent any damage being done to it again? Maybe convert it to something else as well if possible like pdf?

Btw...one other thing - could you remove the file from the website please?

Thanks in advance
Jay
Open Office 4.1.7
Windows 10
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Format error in sub-document content.xml

Post by RoryOF »

A PDF cannot easily be edited, so remain with .odg format, preferably using OpenOffice or LibreOffice, as MS Office might damage it again.

Will remove files now, as requested.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
JR76
Posts: 4
Joined: Fri Dec 20, 2019 3:38 pm

Re: [Solved] Format error in sub-document content.xml

Post by JR76 »

RoryOF wrote:A PDF cannot easily be edited, so remain with .odg format, preferably using OpenOffice or LibreOffice, as MS Office might damage it again.

Will remove files now, as requested.
Thanks again and for the extremely fast response and resolution today!

Happy Christmas :super:
Open Office 4.1.7
Windows 10
Post Reply