[Solved] ODT file with "Attribute office:name redefined"

Discuss the word processor
Locked
Babel Editing
Posts: 3
Joined: Wed Nov 19, 2025 1:35 pm

[Solved] ODT file with "Attribute office:name redefined"

Post by Babel Editing »

Hello,

I cannot reopen an .odt file I just saved.

I get the message: "error on line 2 at column 22322: Attribute office:name redefined"

I've unzipped the .odt and been in to the xml file and there is a whole lot of junk (mainly repeated 1s) in the style:style section. I tried replacing this with code from the original version of the file, and with code suggested by ChatGPT, but no help. And I'm no programmer so that's the limit of my ability.

Can anyone help? Very very many thanks in advance,

Ben
[new to forum]
Last edited by Babel Editing on Wed Nov 19, 2025 11:55 pm, edited 1 time in total.
Open Office 4.1.6 [now updated]
Windows 11 pro
User avatar
MrProgrammer
Moderator
Posts: 5432
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Help needed: Corrupted .ODT file "Attribute office:name redefined"

Post by MrProgrammer »

Hi, and welcome to the forum.

Babel Editing wrote: Wed Nov 19, 2025 1:44 pm … with code suggested by ChatGPT, but no help
Ha! Here is code suggested by a human. It's fixed many similar problems, including the seven given in the tutorial.
[Tutorial] Delete duplicate attributes tool

If you need any additional assistance, attach a document demonstrating the difficulty. I cannot not help further unless you attach a Writer document.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Babel Editing
Posts: 3
Joined: Wed Nov 19, 2025 1:35 pm

Re: Help needed: Corrupted .ODT file "Attribute office:name redefined"

Post by Babel Editing »

Dear MrProgrammer,

Thank you so much for your reply. I am afraid I don't know enough programming to understand your code! Very sorry and also embarrassed.

I attach the problem file. Quite early on in the XML are a bunch of 1s which I am sure should not be there.

Ben
Attachments
M [by].odt
(93.73 KiB) Downloaded 146 times
Open Office 4.1.6 [now updated]
Windows 11 pro
User avatar
MrProgrammer
Moderator
Posts: 5432
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Help needed: Corrupted .ODT file "Attribute office:name redefined"

Post by MrProgrammer »

I used my Delete Duplicate Attributes tool. This recovery took 30 seconds.
Attributes read   : 12553
Attributes written: 12530
Attributes removed: 23
updating: content.xml

20251119.odt
(93.67 KiB) Downloaded 153 times

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Help needed: Corrupted .ODT file "Attribute office:name redefined"

Post by RoryOF »

There were many 1111 blocks scattered through the file. I've never seen anything quite like that; I think Mr Programmer's recovery is as good as you are going to get.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
Babel Editing
Posts: 3
Joined: Wed Nov 19, 2025 1:35 pm

Re: Corrupted .ODT file "Attribute office:name redefined"

Post by Babel Editing »

Dear MrProgrammer (and RoryOF),

I am utterly blown away by your kindness. I really don't know what to say! This forum truly has the original cooperative spirit of the original internet.

Thank you a million times -- you've saved me having to re-do the whole job.

Ben
Open Office 4.1.6 [now updated]
Windows 11 pro
Locked