[Zope-CMF] Historical revisions: Enabling page comparisons

sean.upton@uniontrib.com sean.upton@uniontrib.com
Sun, 30 Mar 2003 15:56:23 -0800


The following has never been tried (by me, at least), so take this with a
grain of salt...

Consider using ESIS/PYX style output of element streams and then using
color-coded plain-old diff.  This is something that the trained technical
and non-technical content user/editor should be able to read.  This, of
course, only works for content that can be transformed in to this sort of
linear stream-of-elements-style of text, and that likely means well-formed
html that can be parsed into such a stream.  If you have HTML that complies
with an w3c HTML DTD, you should be able to validate and output ESIS with
James Clark's nsgmls.  If you use something like Tidy to clean up the html
text that has been authored on every html write/change, you may be in better
shape for this to work.

For metadata, if you wrap this sort of output in an RFC822-style headers and
diff the resulting text, you may find that a diff can represent the changes
well enough, both in structured data/metadata fields (RFC822-formatted
headers) and in structured body-text (ESIS).

Since I haven't tried this, I can't guarantee success, but I think this is a
way I would consider approaching this if I had this need. There may be
practical limits to this approach, but I'm not sure what they are yet. Good
luck.

Sean

-----Original Message-----
From: Ausum Studio [mailto:ausum_studio@hotmail.com]
Sent: Sunday, March 30, 2003 3:34 PM
To: zope-cmf@zope.org
Subject: [Zope-CMF] Historical revisions: Enabling page comparisons


Once that we allow PortalContent to inherit from the History module, there
comes up the issue of enabling comparisons between different revisions. At
this moment it isn't possible with the existing methods, but I guess that is
because the portal objects doesn't store the text in a single "document
source" attribute.

Nonetheless, although we suceeded at allowing the standard comparison
methods to compare "Editable bodies" only, we would have the problem that
that type of comparisons (at html level) aren't friendly to content
maintainers, as they don't neccesarily care about html tags. So we would
need an html-aware comparison engine that would render the latter of the
compared pages, but with differences highlighted; and if it was the case,
indications where strings are missing; just like Google highlights our query
words in "cached".

Are there python modules aimed to perform this? If not, where would you
start to provide this type of functionality to the CMF?


Ausum





_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests