Genii Weblog

Midas 4.00: Wiki link support in Notes client/web

Tue 13 Nov 2007, 08:12 AM



by Ben Langhinrichs
As I mentioned in my previous post, Midas 4.00: More control over file attachments and file icons, Version 4.00 of the Midas Rich Text LSX and Midas Rich Text C++ API has several major themes, and a second one that I want to describe is support for Wiki links in the Notes client (and on the web as well).

When designing Wiki link support, we explored the idea of using CamelCase words, but rejected it as leading to poor writing style.  For similar reasons, other wikis such as Wikipedia discourage CamelCase for Wiki links.  Instead, we focused on how Wiki links could be used in the midst of regular rich text editing.  But before we get buried in syntax, entertaining as it may be to all of you, I want to point out a few key points:

  • Wiki links are resolved as run-time, so a link to a subject that doesn't exist will become an action to create that subject.
  • WIki links are dynamic, so if a link to a subject works and then that subject is deleted, the link will become an action to create the subject again.  If it is created, the action hotspot will become a link again.
  • Wiki links are not visibly  tagged, except on creation, meaning that while it is created as ((Subject)), it appears as Subject or Subject (see below), depending on whether it exists or not,which makes for clearer rich text usage.  There is no switching to confusing Wiki text markup the way most Wikis work.
  • Wiki links do not need to be to the same database.  In fact, using the tagging method, you could have Wiki links pointing to multiple databases or views.  Thus, you could have a Products database and a Sales Person database and a Customer database, and create Wiki links to each of them simultaneously.
  • Wiki links have a few ease of use measures to allow easier creation of URL hotspots, and even a special URL link to Google searches, for example.

The following syntax rules are what we came up with to support Wiki links in Midas:

Wiki Link syntax
((text to match))  - If the string "text to match" matches a document in the search view, this becomes a link hotspot to the document and appears as text to match.

((text to match|Title to show))  - If the string "text to match" matches a document in the search view, this becomes a link hotspot to the document and appears as Title to show.

((text to match#anchor))  - If the string "text to match" matches a document in the search view, this becomes an anchor  link to the document and to the "anchor" anchor in the document,  and appears as text to match.

((tag:text to match))  - If the string "text to match" matches a document in the search view defined for that tag, this becomes a link hotspot to the document and appears as text to match.

But what if the string "text to match" doesn't match a document in the search view?  In true Wiki link form, the link becomes an action hotspot which, if clicked, will compose the document and pre-fill in the value of the "text to match" so that when the document is saved, it would become the appropriate matching document.  To distinguish these links, the action hotspot will appear as text to match.

Convenient Wiki Link extras
((google:large penguins))  - This becomes a URL hotspot which will execute a search for "large penguins", and appear as large penguins.

((midas:WikiMatching method))  - This becomes a URL hotspot which will open the Midas Rich Text LSX on-line help database to the topic "WikiMatching method", and appear as WikiMatching method.

((http://www.GeniiSoft.com)  - This becomes a URL hotspot which will point to the specified URL and appear as www.GeniiSoft.com.

((http://www.ibm.comIBM))  - This becomes a URL hotspot which will point to the specified URL and appear as IBM.

((mailto:Sales@GeniiSoft.com)  - This becomes a mailto:  URL hotspot which will appear as Sales@GeniiSoft.com.

((mailto:Sales@GeniiSoft.comGenii Software sales))  - This becomes a mailto:  URL hotspot which will appear as Genii Software sales.

How could this be used?
Now, I should emphasize, the point is not so much to create a full wiki experience in Notes, although I know how to do that as well, but just to facilitate authoring.  A somewhat extreme example might be this list of actions for me to take to promote the new Wiki links:

  • ((help:WikiMatching method|Create the Help document))
  • ((sales:Promo for Wiki links|Create the Sales promo))
  • ((help:Added Wiki link support|Create the Release note))
  • ((mailto:CustomerList?subject=Midas 4.00 features "Wiki Links" in Notes client|Create the letter to send to customers))
which would become a list that looked like
  • Create the Help document
  • Create the Sales promo
  • Create the Release note
  • Create the letter to send to customers
But each of the actions would do something different, creating a document with the appropriate text in the appropriate place.  The final action would not only open up a mail message, but would pre-fill in the Subject.  By simply clicking on the various topics, I could both do the action, and see what had been done (except the final one)., since the created documents would appear as links.  When I was finished with the list, it would now appear as:
  • Create the Help document
  • Create the Sales promo
  • Create the Release note
  • Create the letter to send to customers
and each of the first three items would be a link to the document that had been created.

Copyright © 2007 Genii Software Ltd.

What has been said:


636.1. Richard Schwartz
(11/13/2007 03:39 PM)

Why did you choose to use round parens rather than square brackets, which are the de facto style standard in other popular wiki systems?

The programmer/mathematician in me worries about rich text content about programming or mathematics , which might look like this:

((a*b) + (c*d))

which would be interpreted as a wiki link.


636.2. Richard Schwartz
(11/13/2007 03:41 PM)

P.S. I forgot to say... Whoooo hoooo! Wiki links! Trés cool feature, Ben! :-)


636.3. Ben Langhinrichs
(11/13/2007 05:26 PM)

Rich - Actually, I went back and forth on this, and, as usual, allow you to set the open and close tags based on a property. My gut feeling was to avoid the square brackets to avoid weird problems with passthrough HTML in case the wiki text starts with a less than sign, such as ((<text)). I am probably overthinking things, and you are right about the potential for mathematical notation issues. Hmm, I'll think about changing the default. Any other opinions? - Ben


636.4. Richard Schwartz
(11/14/2007 06:04 AM)

I kind of figured that passthrough entered into your thinking on this. Definitely good that you made it settable.

P.S. I think your "such as ((..." probably got cut off.