‘Purple numbers’ as recently praised by Jonas Luster, Chris Dent and Tim Bray are an inelegant solution to the problem of granular linking.
Purple numbers require the author to explicitly number each paragraph, even though it is trivial to select paragraphs by position using the DOM, XPath, or CSS selectors. Explicitly numbering paragraphs is redundant, wasting time and bandwidth without adding any new information to the document.
Purple numbers require the reader to put up with purple blobs dotted throughout the text, which look ugly and distract the eye. They have a poor cost/benefit ratio, as they are visible all the time, in every paragraph, rather than appearing when and where the reader actually wants to use them.
A better solution would be to implement granular linking at the browser level, using the existing text selection mechanism. When the reader wishes to link to some text on a page, they should select the text they want by dragging or double clicking it, then invoke "Link To This" from the toolbar or popup menu, which would create a link to the selected text on the clipboard.
The resulting link could be a coarse link to the enclosing paragraph or a granular link to the exact words, depending on the browser configuration. The link URL would require an appropriate fragment ID, which could use XPointer if the browser implementor has the stomach for it, or maybe something simpler tailored to the task at hand.
This browser extension would be more usable than purple numbers and would even work for old web pages that are unlikely to be updated in the future.
Perhaps it could be done in JavaScript. Any takers?
Updates:
Ahoy is a JavaScript implementation of link-by-selection for Mozilla, written by Brian Donovan and released under the GNU GPL. A worthy (and well commented) effort, that demonstrates how it can be done. (via Simon)
psAhoy is a PHP script written by Matthew A. Schneider that dynamically includes the Ahoy JavaScript into arbitrary pages. Perfect for quoting old web pages that can't be updated.
Copyright © 2004 Michael Day, mikeday@yeslogic.com