Page 1 of 1

[Solved] Need help to fix content.xml

PostPosted: Fri Feb 08, 2019 3:15 pm
by marta-s
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>

Re: Need help to fix content.xml

PostPosted: Fri Feb 08, 2019 5:20 pm
by John_Ha
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.

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

PostPosted: Mon Feb 11, 2019 1:58 pm
by John_Ha
marta-s sent me the file. I edited it as shown above to remove the unwanted "office:name=" definitions. The file then opened correctly.