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

Re: Keyword substitution on Word Doc

From: Daniel Patterson <danpat_at_adaptiveinternational.com>
Date: 2003-07-25 01:22:18 CEST

On Fri, 2003-07-25 at 09:09, Peterson, Matt (INV-EDH) wrote:
> Is it possible to perform keyword substitution on a MS Word doc?
> When I tried it, I was unable to read the file. I get the error message:
> "The document name or path is invalid."

I'd say it's unlikely. From memory, most of the data structures within
Word docs are length-indicated, not terminated. This means, any change
to the size of any data (i.e. like keyword substitution) is likely
to screw up the document parser. I.e. You write your word doc, and
it's saved by Word like this:

  <23>$LastModifiedRevision$

So the parser expects 23 characters when it loads the file before it
begins the next field. Upon keyword substitution, you get:

  <23>$LastModifiedRevision: 235$

which is now wrong. The next "data field" starts halfway through your
string now, which is not a valid place to start. At that point,
everything gets confused and you can't load your file.

This is a pretty common trait of most binary file formats.

daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 25 01:23:09 2003

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.