Modify

Opened 18 years ago

Last modified 18 years ago

#541 new enhancement

Support for Diff of OpenDocument files

Reported by: Jay 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 Jay 18 years ago.
OpenOffice Basic macro
flat-xml-text.xsl (254 bytes) - added by Jay 18 years ago.
OpenOffice Flat XML Filter
XMLFilterSettings1.jpg (23.6 KB) - added by Jay 18 years ago.
XMLFilterSettings2.JPG (26.7 KB) - added by Jay 18 years ago.
conv2ooo.bat (3.8 KB) - added by Jay 18 years ago.
Batch file to help with multiple file conversions

Download all attachments as: .zip

Change History (9)

comment:1 Changed 18 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.

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 18 years ago by Jay

OpenOffice FlatXMLFilter:

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

Changed 18 years ago by Jay

Attachment: MyConversions.bas added

OpenOffice Basic macro

Changed 18 years ago by Jay

Attachment: flat-xml-text.xsl added

OpenOffice Flat XML Filter

Changed 18 years ago by Jay

Attachment: XMLFilterSettings1.jpg added

Changed 18 years ago by Jay

Attachment: XMLFilterSettings2.JPG added

Changed 18 years ago by Jay

Attachment: conv2ooo.bat added

Batch file to help with multiple file conversions

comment:3 Changed 18 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 18 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
Set your email in Preferences
Action
as new The owner will remain anybody.

Add Comment


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

 
Note: See TracTickets for help on using tickets.