Linking in the new XHTML 2.0 Draft

by Bob DuCharme

Related link:

The W3C HTML Working group recently released a new working draft of the XHTML 2.0 specification. There's a lot there, but I went right for the linking material, and there's a lot to like.

The Hypertext Module section is deceptively brief. It just shows the a element, which has the Common set of attributes. This encompasses ten attribute declaration collections, including the Embedding, Hypertext and Metainformation/Metadata collections. The Embedding attributes are two simple attributes for describing transclusion. The Hypertext attribute list includes interesting attributes to describe semantic relationships and others designed to broaden the possibilities of document navigation—for example, to make hands-free and sight-free navigation easier.

The Metadata attribute collection is interesting from a linking perspective because many of these attributes describe the relationship of their element to something else. The about attribute "specifies which resource has a specified property"; the content attribute "specifies the metadata associated with an element"; the resource attribute "indicates the URI of the resource that is being referred to by an element"; the rel attribute (and, in the reverse direction, the rev element) "describes the relationship between the resource specified by the about attribute (or its default value) and the resource referred to by the resource attribute." This lays the groundwork for describing many of the kinds of resource relationships that RDF is good at. In his comments on the draft to the public-rdf-in-xhtml mailing list, Dominique Hazaël-Massieux, wrote "I think it would really be worth spending some time writing a few of the
RDF/XML test cases in XHTML to detect inconsistencies/incompatibilities."

XHTML 2.0 also describes the link element. (Unlike the previous Working Draft, link doesn't get its own module. This is a good idea, because "Linking Module" sounds much more generalized than it really is.) Most would recognize the XHTML link element from its use in head elements to perform tasks such as the naming of stylesheets to use with the containing web page. While the May 2003 XHTML 2 draft said that this element "may only appear in the head section of a document", the new draft makes no such constraint, and the RELAX NG schema that accompanies the working draft does allow link elements in an XHTML body. Unfortunately, all the examples shown in this draft show it in head elements. I'm curious what roles the Working Group pictures for link elements inside of body elements.

The link element has all the same attributes described above for the a element, and the working draft adds some extra documentation about the potential uses of the rel and rev attributes. It also describes potential interpretations of the element by search engines looking for alternate versions of the document.

I've already sent some comments to the working group. If you're interested in the future of XHTML linking, read these sections and send in comments yourself. (For the mailing address and a link to the comment archives, see the paragraph beginning "Formal issues" in the "Status of This Document" section. Isn't it ironic that I have to point to that paragraph using descriptive natural language? It's too bad that the XHTML 1 document telling us about XHTML 2 doesn't assign id attribute values to its block-level elements so that we can treat them as link destinations.) There's been some additional interesting discussion on the public-html-in-rdf-tf list, often cc'd to the Working Draft comments mailing address.

What do you like or not like about the linking markup in the latest HTML Working Draft?


2004-09-09 09:50:36
Hmm. If it tastes like RDF and it smells like RDF...
Thanks for bringing this interesting development to attention. (Side note: you've put a lot of clear thinking about linking into this blog. Have you considered compiling an article along the lines of "latest developments in linking"? Perhaps after the XHTML 2.0 thing plays out?)

It is very interesting to see XHTMl WG participants on that comments mailing list throw around ideas of "triples", "resources", "properties", etc. so freely. I think it's another sign that RDF might have been made unfortunately ugly, but has the right substance for improving Internet technologies. Yet despite all the RDF-like motions, there seems to be little explicit reference or coordination between what XHTML 2.0 is doing and the SemWeb activity. I think this may be dangerous (as has been stated in a comments thread). Better formal references and some clear coordination could help ensure that XHTML and SemWeb complement each other and don't end up forking off into two very different branches.

Of course, this is all new, and who knows who is meeting out there, considering these very issues. We'll just have to watch these developments and see if XHTML helps brings some of the basic, sound ideas of RDF to the mainstream.