Modify

Opened 8 years ago

Last modified 7 years ago

#541 new enhancement

Support for Diff of OpenDocument files

Reported by: jayjones Owned by: anybody
Priority: normal Component: Request-a-Hack
Severity: normal Keywords: OpenDocument jay
Cc: jay@… Trac Release: 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?

Attachments (5)

MyConversions.bas (3.7 KB) - added by jayjones 8 years ago.
OpenOffice Basic macro
flat-xml-text.xsl (254 bytes) - added by jayjones 8 years ago.
OpenOffice Flat XML Filter
XMLFilterSettings1.jpg (23.6 KB) - added by jayjones 8 years ago.
XMLFilterSettings2.JPG (26.7 KB) - added by jayjones 8 years ago.
conv2ooo.bat (3.8 KB) - added by jayjones 8 years ago.
Batch file to help with multiple file conversions

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by jayjones

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.

Adapted from: http://www.oooforum.org/forum/viewtopic.phtml?t=3772

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")


See Also

http://trac.opendocumentfellowship.org/odfviewer/wiki/WikiStart
http://www.oooforum.org/forum/viewtopic.phtml?t=3772

comment:2 Changed 8 years ago by jayjones

OpenOffice FlatXMLFilter:

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

Changed 8 years ago by jayjones

OpenOffice Basic macro

Changed 8 years ago by jayjones

OpenOffice Flat XML Filter

Changed 8 years ago by jayjones

Changed 8 years ago by jayjones

Changed 8 years ago by jayjones

Batch file to help with multiple file conversions

comment:3 Changed 8 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 7 years ago by jayjones

poutinedevicto,

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

It would be very useful.

Regards,
Jay.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.