Genii Weblog

MRTYB with Midas #10 - Rich text comparisons with red-lining

Tue 10 Jan 2006, 11:36 PM



by Ben Langhinrichs
A couple of years ago, I started this list... and only made it part way through the list due to time constraints.  With ten days left until I leave for Lotusphere 2006, I decided to reprint these and, I hope, finish off the list.  In addition, I will update the topics to reflect changes in the past couple of years...

A potential customer was evaluating our Midas Rich Text LSX recently, and commented that the documentation was great, but he wished there was one place where it listed the top ten ways to use Midas.  Now, I am not a big fan of top ten lists, especially the Dave Lettermen "Top Ten Stupid Pet Tricks" variety, but the customer is always right, so I decided to try creating a top ten list.  To give this list more lasting value, I'll try to post one post each few days and provide some explanation and links to relevant sample code and Help documents.  Starting with #10...


#10) Rich text comparisons with red-lining

Description
Midas enables rich text comparisons in two modes.  The comparison "with deletions" shows both additions and deletions.  It is generally considered the "Approver" view, since it allows a person approving the modifications to see what is removed as well as what is added or modified.  The comparison "without deletions" shows additions and modifications, but not deletions.  It is generally considered the "Public" view, since it allows the public to know what is new is a document without emphasizing what has been taken out.

History
Rich Text comparisons were introduced in Version 1.4, released in July 1998.  The functionality was developed as a custom enhancement at the request of a company in the UK that wanted to highlight changes to policy documents.

Comparison with standard Notes/Domino functionality
Standard classes in Notes/Domino have no rich text comparison ability at all, and there is no talk of adding such functionality.  Customers wanting such functionality sometimes resort to exporting data to MS Word, with all the data loss that entails, and doing the comparison there.

Documentation
Documented in the Midas Help database by looking at the Contents view and going to 04 Midas Classes/04 GeniiRTComparison.  Start with the GeniiRTComparison class and look at the various properties.  Also look in particular at the Compare method.  Also, take a look at the Working with rich text comparisons document (02 Reference Guide/02 Working with/Working with rich text comparisons), which lists the assumptions and rules under which comparisons are made.

Screenshot (from Review It! sample db - see below)
Screenshot of reviewed text

On-line demo
Review It! On-Line: An adaption of the downloadable Review It! sample demonstrates the Midas Rich Text LSX doing red-lined comparisons on the web. A slightly modified version that uses the rich text applet is also available upon request.

Sample Database
Review It! (Notes client, Web browser) Richtext comparison, Red-lining
Example shows how to use the red-lining rich text comparison features of the Midas Rich Text LSX both in the Notes client and on the web.

Sample Script Snippet
This is adapted from a customer's script, and is very similar to that of the on-line Review It! sample:

Dim cmp As New GeniiRTComparison
Dim flag As Variant

cmp.InsertionFont = "Blue"
cmp.InsertionTagFont = "Blue Superscript Roman"
cmp.DeletionFont = "Red +Strikethrough"
cmp.DeletionTagFont = "Red Superscript Roman"
cmp.TableRowDeletionTag="(-Rows)"
cmp.TableRowInsertionTag="(+Rows)"
cmp.TableColumnDeletionTag="(-Columns)"
cmp.TableColumnInsertionTag="(+Columns)"
cmp.BitmapDeletionTag="(-bmp)"
cmp.BitmapInsertionTag="(+bmp)"
cmp.SectionDeletionTag="(-section)"
cmp.SectionInsertionTag="(+section)"
cmp.DoclinkDeletionTag="(-link)"
cmp.DoclinkInsertionTag="(+link)"
 
cmp.IdentifyFontFaceChange =False
cmp.IdentifyColorChange = False
cmp.IdentifyBoldChange = True
cmp.IdentifyItalicChange = False
cmp.IdentifyPointSizeChange = True
cmp.IdentifyUnderlineChange = True
 
Call cmp.RTItemOriginal.ConnectBackend(doc.Handle, "BodyBefore", True)
Call cmp.RTItemRevised.ConnectBackend(cmp.RTItemOriginal.Handle, "BodyAfter",True)
Call cmp.RTItemCompared.ConnectBackend(cmp.RTItemOriginal.Handle, "ApproverBody",True)

' *** First, create the comparison "with deletions" into the ApproverBody field ****   
flag = cmp.Compare(True)
 
' *** Second, create the comparison "without deletions" into the PublicBody field ****    
Call cmp.RTItemCompared.ConnectBackend(cmp.RTItemOriginal.Handle, "PublicBody",True)
flag = cmp.Compare(False)

Copyright © 2006 Genii Software Ltd.

What has been said:


423.1. Ian Randall
(24/10/2006 05:04 PM)

My companies Lotus Notes software package incorporates a controlled document module (for certain controlled documents such as procedures that are subject to version control, document review workflows, audit, archiving etc.).

We currently handle change management in a way that avoids redlining, but I am intrigued about your redlining (markup)system:

1) How does it handle multiple reviewers and change context?

2) Also, we have a need to track suggested changes that have been rejected as well as accepted, how does your redlining system handle rejected changes? and can you also add comments as to why a change has been rejected?

3) Many of our users publish controlled documents that consist of or contain file attachments (i.e. word, excel, PDF files), does your redlining system handle changes in these file attachments as well? if so, how are these changes highlighted?

4) As our application is also fully web enabled, I am interested to know if your redlining feature work equally well through a web browser iterface?

5) We currently send automatic update notification emails when a new version of a controlled document is approved, this update email contains some "change synopsis text". Do you feel that your redlining system could be used to automate or semi-automate the creation of this change synopsis information?

Regards,

Ian


423.2. jacques Subra
(14/09/2007 01:29)

Bonjour,

Le CIRSO souhaite convertir des documents de format Rich Text en format HTML.

Avez-vous une solution pour faire cela.

Si oui, merci de nous communiquer vos conditions commerciales d'expérimentation et d'utilisation.

Salutations.


423.3. jacques Subra
(14/09/2007 01:29)

Bonjour,

Le CIRSO souhaite convertir des documents de format Rich Text en format HTML.

Avez-vous une solution pour faire cela.

Si oui, merci de nous communiquer vos conditions commerciales d'expérimentation et d'utilisation.

Salutations.


423.4. jacques Subra
(14/09/2007 01:29)

Bonjour,

Le CIRSO souhaite convertir des documents de format Rich Text en format HTML.

Avez-vous une solution pour faire cela.

Si oui, merci de nous communiquer vos conditions commerciales d'expérimentation et d'utilisation.

Salutations.