Difficulties with Flat XML under source control
Johannes Sixt
j6t at kdbg.org
Sun Jun 17 13:10:19 PDT 2012
I want to place a software manual under source control. It seems most
feasible to use a flat XML format, in particular, .fodt.
But I have some difficulties because when LO 3.5.4 opens a .fodt and
saves it again without making any changes, the resulting file changes
nevertheless.
I'm writing a small tool that transforms the XML into a canonical format
so that only substantial changes remain. The question is: Which
transformations are allowed?
- I bring the styles under <office:automatic-styles> into a canonical
order. Do styles in this section only reference style from
<office:styles> section (e.g. via style:parent-style-name), which occurs
earlier in the file?
- I give the automatic style canonical names because due to the
re-ordering they are re-numbered, which leads to a whealth of unwanted
changes in <text:span style-name=...> attributes.
(This seems to work so far.)
But there are other changes:
- <office:meta> changes. It's not a problem, I don't care about this.
- <office:settings> changes. I don't know, yet, whether I mind or not.
- The <draw:frame draw:z-index="251"> attribute changes. Can I just
replace the z-index with 1 or 2? What will happen?
- The <text:list xml:id="list533178598"> changes. That xml:id does not
seem to be used anywhere. Can I just remove it? What will I lose?
- Measurements change. E.g. (just to pick one case), in
<style:graphic-properties> the draw:visible-area-width changes from
6.088cm to 6.089cm. Is there a remedy to avoid changes of this kind?
Any insights are welcome!
Thanks,
-- Hannes
More information about the LibreOffice
mailing list