Will Atom not have a “link” element?
by ZetaGecko | Add Your Comments | Atom/RSS
In case that headline caused anyone's heart to seize up momentarily, let me say first that Atom will have some sort of linking capability. It just may not be found in an element named "link". Objections are raised from time to time that the link element, with it's seemingly constantly expanding list of @rel values (which are used to differentiate between links with various purposes) is a mess, and should be replaced by different elements for each link type. Until yesterday, I've been opposed to doing that, but I've begun warming to the idea...slightly.
The current Atom spec defines a "Link Construct" which itself is not a specific XML element, but provides a pattern which actual elements can follow. At present, the only element that follows the Link Construct pattern is the link element. Both are referred to in conversation using just the word "link", which sometimes causes confusion between them. In particular, I believe I've had the incorrect impression that some people wanting to abolish the link element wanted to abolish the link construct, and create other elements to replace it, which wouldn't necessarily all follow the same pattern. That, I thought was a very bad idea.
One of the advantages of the link element is that extensions could create their own @rel values, and (if the usage of the link element were tightened up a bit, which is the purpose of one of the proposals I've written), software that didn't understand the @rel value would still be able to operate on the link in a reasonable way. If the link element were replaced with multiple elements, each possibly following a slightly different pattern, that extensibility path would be lost.
It occurred to me yesterday that if all elements containing an href attribute (for example) were REQUIRED to be Link Constructs, then link extensibility could still be achieved without having to shoe-horn everything into the link element. It would be a little less convenient to identify Link Constructs than to process a list of link elements, but it would be doable. Perhaps we've found a way to reconcile the divergent opinions on this subject.