Opened 13 years ago

Support for Diff of OpenDocument files

Reported by: Owned by: Jay anybody normal Request-a-Hack normal OpenDocument jay Jay 0.9

Description

OpenOffice OpenDocument format is already an established document format consisting of seperate xml, binary and meta files zipped into a single containter with different file extension (.odt .ods etc) for the different applications.

How do you store these under VersionControl and support Diff Viewing, Merging etc?

comment:1 Changed 13 years ago by Jay

A current work-around for this is to store all OpenDocument files as a Flat xml file (single xml text document unzippped) with all files and represented as xml entries, using the OpenOffice XSLT filters.

Install in OpenOffice 2.0 macro "My Macros/Standard/MyConversions"

Add OpenOffice 2.0 "XML Filter Settings" :

Create batch file to convert all those *.doc you want to convert:

Send all your MSOffice *.doc files to batch convert using Command line or Windows File association: "C:\Program Files\OpenOffice.org 2.0\program\soffice.exe" macro:///Standard.MyConversions.SaveAsOOOFlat("%1")

comment:2 Changed 13 years ago by Jay

OpenOffice FlatXMLFilter:

Oh dear, server dies when i try to add attachments :(

Changed 13 years ago by Jay

OpenOffice Basic macro

Changed 13 years ago by Jay

OpenOffice Flat XML Filter

Changed 13 years ago by Jay

Batch file to help with multiple file conversions

comment:3 Changed 12 years ago by anonymous

Hi, I also worked on allowing source-control using flat XML documents in OpenOffice, starting from the same topic on oooforum.org.

I now have an XSLT stylesheet for export that, in addition to flatting out the OpenOffice Text doc to an XML, will remove optional elements/attributes that changes from a save to another and have no impact on the rendering of the document - things like current viewing position, printer settings, current fields values - but would break attempts by the source control system to merge two versions of the document.

I'm at a point where merges are working well, if some strict rules are followed while editing. The biggest constraint is the automatic styles generated by manual insertion of italics/bold/font types and sizes, etc. All those things must be done by using named styles.

New tables and list uses automatic styles for each entry by default: "Default Formatting" must be applied to it's content before saving. I know that OpenOffice contributors are looking into defining Table styles, right now, even if using AutoFormat, a new automatic style is created for each table.

poutinedevicto

comment:4 Changed 12 years ago by Jay

poutinedevicto,

Any chance you could add your XSLT style sheet as an attachment here?

It would be very useful.

Regards, Jay.

Modify Ticket

Change Properties