[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Diffing XML files or storing binary documents

From: Paul Bijnens <paul.bijnens_at_xplanation.com>
Date: 2004-07-15 11:46:55 CEST

Chris Jensen wrote:

> Has anyone else here had experience with trying to store documentation
> into subversion? Specifically I'm looking at OpenOffice files.
> I was thinking of using the FlatXMLFilter which will avoid the zipping,
> so the files should diff better and thus store more efficiently in the
> repository shouldn't they?
>
> Any suggestions, caveats, neat tricks when doing this?

I'm currently testing some versioning of XML-documents, where I do
like to have a finegrained view on the differences in the XML-files.

I don't use OOo for this (although some people suggest I could/should).

I make sure I always safe my xml-files in a format produced by the
perlmodule XML::Twig "nsgmls" style; from the man page:

   Line breaks are inserted in safe places: that is within tags, between
   a tag and an attribute, between attributes and before the > at the
   end of a tag.
   This is quite ugly but better than "none", and it is very safe, the
   document will still be valid (conforming to its DTD).
   This is how the SGML parser "sgmls" splits documents, hence the name.

Diff-ing these line-oriented XML-files works good for my application.

Currently I have to make sure that my xml-application always writes
the files in that format. My users however can, and are permitted,
to edit the xml-files using any xml-editor or even simple text editor.
Because the xml is easier to read when using other formatting
conventions, they sometimes forget to reformat the file into that
ugly "nsgmls" format. Tracing the "real" diffs is difficult for
such files.

I'm new to subversion, and if I somehow could automate subversion to
always preprocess a file to force the "nsgmls" format before checking
in that would help a lot (and at the same time do a dtd-check too?).
Anybody an idea how to handle this using subversion?

Using OOo with some filter similar to FlatXMLFilter (which I'm
unfamiliar with too) is one of the possibilities, but still leaves
an opportunity to mess with the xml-file using other means.

I'm just testing out some possibilities, nothing real to show yet.

-- 
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
http://www.xplanation.com/          email:  Paul.Bijnens_at_xplanation.com
***********************************************************************
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...    *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 15 12:09:27 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.