How to avoid .fodt file attributes changing on every save?

asked 2015-06-06 14:26:29 +0200

l0b0 gravatar image

updated 2015-08-25 19:40:43 +0200

Alex Kemp gravatar image

I'm version controlling every formatted text document I have in OpenDocument Flat XML Document (FODT) format to have a chance at seeing the history and possibly doing some automated cleanup. However, any change to the document causes attributes elsewhere in the file to change. For example (trimmed some irrelevant attributes to avoid line wrap):

-   <text:h text:style-name="P78">Foo</text:h>
-   <text:list xml:id="list221802702260507">
+   <text:h text:style-name="P73">Foo</text:h>
+   <text:list xml:id="list125802385019052">

In case of the xml:id attributes I can probably simply remove them without issue, but the style names still have to line up with the actual style names in the metadata. How do I work around this issue so that diffs are as small as possible?

Using LibreOffice

edit retag flag offensive close merge delete


There is a Similar Question on StackOverflow:

EdwardE gravatar imageEdwardE ( 2016-07-26 12:28:26 +0200 )edit