WHY ANNOTATING THE WEB IS HARD
And Why A Xanalogical Approach Would Help
Part 4 (The last part, I swear.)
THE XANALOGICAL WAY
The guy who came up with the word hypertext, Ted Nelson, has been advocating a global hypertext system since the 1960s based on a somewhat different data model than what is used on the Web. Nelson's hypertext system is called Xanadu®, and so things that are designed in accordance with the design principles of Xanadu are xanalogical. Xanadu is a trademark, xanalogical is not.
The part of the xanalogical model that we'll be talking about here actually won't seem too unfamiliar if you have some understanding of how audiovisual material is put into Web pages.
In a xanalogical system, documents are compositions of media fragments. They don't contain media fragments, they just contain pointers to media fragments that are out there in the network and which are transcluded into the visible document for the reader. An example of transclusion is the way that images are handled in HTML. When you load a Web page and there's a picture in it, the picture isn't actually stored inside the HTML of the Web page. Rather, there's an <img> element in the page which contains the Web address – the URL – of the image. The browser loads the image in the background and then plops it into the page layout, making the document look like it's all one coherent thing when it's actually assembled from different pieces around the Web.
On the Web, text is not transcluded in this way. It's cooked right into the HTML. It's either put there by hand, or, more often than not, embedded into the HTML by some kind of database-driven content management system. But it doesn't have to be. It's trivially easy to implement transcluded text in HTML, and I am telling you, if we did this en masse it would solve the annotation problem.
Let's use our "Animal Encounter" example again, but we'll start in a different place.
The text of the article is now stored in a plain-text document on the news company's site. Let's give it a hypothetical URL of https://newsworldsite.news/rawtext/202501090257, and the text looks like this:
-----
NEWSWORLDSITE dot NEWS
Date: 2025-01-09T02:57:00
Animal Encounter
A population of a rare subspecies of wolf once thought extinct was confirmed to exist on Vorvos Island this week. The wolves were spotted by a high-school student who was on a class trip to the Zornkorn Wildlife Park.
The student posted photos of the wolves on social media after becoming isolated from her group. The photos were later confirmed by biologists to show a group of canis lupus superdupus, a species not known to have been encountered by humans in over a century.
©2025 News World Site dot News. All rights reserved.
-----
When you find the article on the news site, it's delivered in HTML, our transient media delivery vehicle on the Web. But if you look inside the HTML, you see something a little different from code we saw before:
<html>
<head>
...stylesheets, scripts, meta tags...
</head>
<body>
<header>
Company Logo
<nav>Navigation links...</nav>
</header>
<article id="content_section">
<h1><x-text src="https://newsworldsite.news/rawtext/202501090257"
origin="55"
extent="71"></x-text></h1>
<p><x-text src="https://newsworldsite.news/rawtext/202501090257"
origin="73"
extent="290"></x-text></p>
<p><x-text src="https://newsworldsite.news/rawtext/202501090257"
origin="292"
extent="550"></x-text></p>
</article>
<footer>©2025 NewsWorldSite dot News</footer>
</body>
</html>
The text content of the article has been replaced with hypothetical HTML elements, <x-text>. The <x-text> elements tell the browser to go grab some text from https://newsworldsite.news/rawtext/202501090257 and transclude it into the document. The 'origin' and 'extent' attributes tell the browser which portions of the text to insert. These are zero-based start/end indexes into the codepoints of the source text, just like the offsets we were using before when constructing our child sequence ranges.
Now, how does this help us with the annotation problem?
When the user selects the area of the document that they want to link to, the browser looks at the 'src', 'origin' and 'extent' attributes of the <x-text> elements enclosing the text that they're selecting, and creates the target address of the link based not on where the text lies within the HTML document, but instead based on where it is in the source plaintext.
The selection that we used before, the range from "on a class trip..." to "...from her group", could be represented very simply like this:
https://newsworldsite.news/rawtext/202501090257#246-387
What happens if the news site inserts an advertisement between the paragraphs? Nothing. When the browser is highlighting or otherwise decorating the target of an annotation of a transcluded resource like this, it wouldn't be paying attention to HTML document structure, it would be paying attention to the addresses of the transcluded text. Every single letter of the source text of the article can be said to have a unique URL, and that's what the browser is matching against. The link address points through the HTML presentation at the resource which is being presented.
But what if the plain-text of the article is changed? Well, we can't guarantee that that won't happen. This is something that needs to be addressed at a policy level, not a technology level. In a xanalogical system, source texts would not change once published - this is a fundamental principle of these types of systems. Once it's out there, it's out there. People are linking to it, people are transcluding it – if you change the source, stuff breaks. We don't want breakage.
Instead, the xanalogical way of making a correction would be to append new text at the end of the original source text, and then change what text is being transcluded in the HTML document. This is a safe, non-breaking thing to do. The source text for this article could be amended like so:
-----
NEWSWORLDSITE dot NEWS
Date: 2025-01-09T02:57:00
Animal Encounter
A population of a rare subspecies of wolf once thought extinct was confirmed to exist on Vorvos Island this week. The wolves were spotted by a high-school student who was on a class trip to the Zornkorn Wildlife Park.
The student posted photos of the wolves on social media after becoming isolated from her group. The photos were later confirmed by biologists to show a group of canis lupus superdupus, a species not known to have been encountered by humans in over a century.
©2025 News World Site dot News. All rights reserved.
--
Date: 2025-01-09T03:19:32
Correction: An important detail was omitted from the initial version of this article. The second paragraph should begin with the following text
The student was devoured by the wolves.
©2025 News World Site dot News. All rights reserved.
-----
Then, back in the HTML document, they could simply update the second paragraph to include a new <x-text> element which would transclude the new text ahead of the old text:
...
<article id="content_section">
<h1><x-text src="https://newsworldsite.news/rawtext/202501090257"
origin="55"
extent="71"></x-text></h1>
<p><x-text src="https://newsworldsite.news/rawtext/202501090257"
origin="73"
extent="290"></x-text></p>
<p><x-text src="https://newsworldsite.news/rawtext/202501090257"
origin="776"
extent="551"></x-text><
x-text src="https://newsworldsite.news/rawtext/202501090257"
origin="292"
extent="814"></x-text></p>
</article>
...
I believe that this is an inherently better way to handle corrections and revisions. The article can be presented in its corrected form on the Web site, and if anyone wants to see its revision history they can simply go directly to the source text.
What happens to your annotation after this correction is made? Again, nothing. Remember, the browser would be matching against the addresses of the codepoints of the transcluded text, not the order in which things appear in the document. So the text that was originally the target of your annotation would be highlighted/marked, while the newly-inserted text would not.
Another advantage of linking directly to a source plain-text like this is that the range of codepoints in the target address tells you exactly how much text is being referenced. Again, there's not necessarily any guarantee that the text wouldn't be changed (although there should be strong policy enforcement against this), but unlike a pointer range in an HTML document, which reveals nothing about what lies between the pointers, there is at least a quantity represented in the plain-text codepoint reference. [If we really wanted to get serious about verifiability of link targets, then links could specify not only a range of codepoints but a checksum of the referenced text – but that's probably overkill.]
OTHER ADVANTAGES
There is additional utility to this data model, too.
When you make a link or annotation to a source plain-text, then your browser can overlay an indicator of your link/annotation onto any HTML document that transcludes that portion of the source plain-text.
For example, let us assume that this "Animal Encounter" article has been quoted in someone's blog. The quotation won't just be a copy/paste blockquote like we're all accustomed to; it will be a xanalogical quotation, using <x-text> elements to transclude directly from the source text.
When your browser loads the blog page, and it's loading-in the transcluded text, it's going to also be cross-referencing the transclusions in the page with your link/annotation database and it will see that you made an annotation to that source text. If the fragment that you linked to is present in the quotation, then your browser will overlay some kind of visual indicator that there's a link/annotation to that text fragment.
You make one link, and it applies to an unlimited number of HTML documents that present that content.
And, of course, transcluding quotations - transquotations, we might say - are intrinsically connected to their source text, their original context. This has nothing to do with linking/annotation specifically, but it's worth mentioning because it's another fundamental benefit to this data model. If the text is being transcluded from a source document, then it should be a simple matter for a user to right-click on any quotation in a document, select a menu option like "show source text", and be presented with the original, full context, of the quotation.
This is dealt with more in my explainer on DISCOVERABILITY and on the problem of REUSE