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

Re: Keyword expansion with .docx files

From: Toby Thain <toby_at_telegraphics.com.au>
Date: Mon, 29 Sep 2008 11:52:40 -0400

On 29-Sep-08, at 9:01 AM, Sam Barnett-Cormack wrote:

> Benjamin Smith-Mannschott wrote:
>> On Sep 29, 2008, at 03:08, Ryan Schmidt wrote:
>>>> I think the reason is that a .docx file is just a container (ZIP
>>>> file) containing XML files:
>>>> _rels
>>>> docprops
>>>> word
>>>> document.xml
>>>> ....
>>>> [Content_Types].xml
>>>>
>>>> etc.
>>>>
>>>> Exists there a way to support keyword expansion for .docx too?
>>>
>>> No. Unless the string "$Id:: $" appears in plaintext in the
>>> file, Subversion can't expand the keywords.
>> And the string "Id:: $" won't appear in this case since the
>> entries of a docx zip file are compressed. Were this string, by
>> some random chance to appear in the zip file, altering it would
>> very likely break the file.
>
> While this is true, it presumably wouldn't be horrific to code a
> way to make this work - a property that allows keywords to be
> handled on *specified* files with *certain supported* compressions.
> Pretty simple pre- and post- filter. Would need to note caveats
> that it would break any automatic signatures and so on in the file,
> of course. I'd imagine it'd be *fairly* straightforward to write
> the generic wrapping code and put filters in for zip, compress,
> gzip and bzip2.
>
> If I had any idea about subversion internals, and any time, I'd
> offer to try to do it.

NO vote here. I don't see this as a reasonable extension of
Subversion. Keyword expansion is dodgy enough without poking around
in archives (of which there exist an unsupportable myriad variations).

One conceptual reason: Source control in the Subversion mould works
best on an *expanded* tree of text files, in order to best expose the
structure and content of your filetree to versioning. Trying to
extend its functionality (even just this) into archives is a slippery
slope.

It would be nice to say that this is another failing of docx, but I
believe the OpenOffice suite uses ZIP'd XML as well, likewise
defeating straightforward version control.

--Toby

>
> Sam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-29 17:53:10 CEST

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.