[Solved] Need help to fix content.xml

Discuss the word processor

[Solved] Need help to fix content.xml

Postby marta-s » Fri Feb 08, 2019 3:15 pm

Hello everyone!

I was working on a report in OpenOffice 4.1.2 on Windows 10 with text, pictures and comments when it crashed. File recovery doesn't work. I followed this tutorial: viewtopic.php?f=71&t=87180 However, I haven't been able to fix the problem as I don't know what exactly should be deleted. XML Copy Editors shows "Error at line 2, column 3547: duplicate attribute". I've pasted the part where the error should be below, it's right after the first "office:name=..." command.

I'd appreciate any help with this issue!

Marta


Code: Select all   Expand viewCollapse view
<style:font-face style:name="Andale Sans UI" svg:font-family="&apos;Andale Sans UI&apos;" style:font-family-generic="system" style:font-pitch="variable"/><style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/></office:font-face-decls><office:automatic-styles><style:style office:name="__Annotation__755_3150985601111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"HERE office:name="__Annotation__877_315098560111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" office:name="__Annotation__1007_3150985601111111111111111111111111111111111111111111111111111111111111" office:name="__Annotation__1015_3150985601111111111111111111111111111111111111111111111111111" office:name="__Annotation__1439_31509856011" office:name="__Annotation__1440_3150985601" office:name="__Annotation__1441_315098560111111111111111111111111111111" office:name="__Annotation__1452_315098560111111111111111111111111111111111111111111111111111111111111111111111111111" office:name="__Annotation__1457_3150985601111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" style:name="Tabelle1" style:family="table"><style:table-properties style:width="16.999cm" table:align="margins"/></style:style>
Last edited by robleyd on Sat Feb 09, 2019 1:52 pm, edited 2 times in total.
Reason: Add green tick
OpenOffice 4.1.2 on Windows 10
marta-s
 
Posts: 1
Joined: Fri Feb 08, 2019 2:52 pm

Re: Need help to fix content.xml

Postby John_Ha » Fri Feb 08, 2019 5:20 pm

It is a well known problem when a reviewer uses MS Word.

Upload the file and I will look at it. Or see my email - send me the file.

It looks very much like Case 1 in the Tutorial you mention at [Tutorial] Format error discovered in sub-document where the first style definition has been corrupted by multiple office:name definitions being added to it. Try deleting

Code: Select all   Expand viewCollapse view
office:name="__Annotation__755_3150985601111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"HERE office:name="__Annotation__877_315098560111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" office:name="__Annotation__1007_3150985601111111111111111111111111111111111111111111111111111111111111" office:name="__Annotation__1015_3150985601111111111111111111111111111111111111111111111111111" office:name="__Annotation__1439_31509856011" office:name="__Annotation__1440_3150985601" office:name="__Annotation__1441_315098560111111111111111111111111111111" office:name="__Annotation__1452_315098560111111111111111111111111111111111111111111111111111111111111111111111111111" office:name="__Annotation__1457_3150985601111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"

so you are left with as below, with a space between the remaining bits after the deletion.

Code: Select all   Expand viewCollapse view
<style:font-face style:name="Andale Sans UI" svg:font-family="&apos;Andale Sans UI&apos;" style:font-family-generic="system" style:font-pitch="variable"/><style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/></office:font-face-decls><office:automatic-styles><style:style style:name="Tabelle1" style:family="table"><style:table-properties style:width="16.999cm" table:align="margins"/></style:style>

It's much easier to see if you pretty print - don't forget to Linearise XML before saving the edited xml file. I cannot pretty print the extract.

Clipboard01.gif
Example from tutorial

Clipboard02.gif
Your file - Delete all the blue stuff leaving a space

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.
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Manual, the Writer FAQ, the Writer Tutorials and the Writer guide.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Need help to fix content.xml

Postby John_Ha » Mon Feb 11, 2019 1:58 pm

marta-s sent me the file. I edited it as shown above to remove the unwanted "office:name=" definitions. The file then opened correctly.
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Manual, the Writer FAQ, the Writer Tutorials and the Writer guide.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK


Return to Writer

Who is online

Users browsing this forum: No registered users and 24 guests