XML.com: XML From the Inside Out
oreilly.comSafari Bookshelf.Conferences.

advertisement

XHTML 2.0: The Latest Trick
by Kendall Grant Clark | Pages: 1, 2

Everything is a link. XHTML 2.0 includes a group of element attributes which are defined for every element, called the "Common Attribute Collection" (CAC). Since attribute collections are often used to manage large XML or SGML applications, XHTML 2.0's CAC isn't noteworthy per se. However, XHTML 2.0 moves the href attribute into the CAC, which means that every element in XHTML 2.0 can be a hyperlink. That's the sort of fundamental change that it's hard to evaluate at this very early point, but it's immediate utility is pretty obvious. Instead of writing constructs like,

<h2>
 <a href="#rights">Article 5. Individual Rights 
 and Obligations</a>
</h2>

people will be able to write shorter, equally clear constructs like,

<h2 href="#rights">Article 5. Individual Rights 
and Obligations</h2>

I think this change will be very popular in the long run; but there are already those who've objected that XHTML 2.0 really should make some use of XLink (See Bob DuCharme's recent XML.com article, XLink: Who Cares?).

Unordered sections and headings. No other HTML bugaboo is more common than the total disaster which is numbered headings, intended to be the major structural elements of HTML documents, but which have been most often (mis)used for their conventional presentational effect. XHTML 2.0 does not yet deprecate the familiar set of h1 through h6 heading elements, though I think there's a pretty good chance that they will be deprecated eventually. XHTML 2.0 does, however, lay the ground work for their deprecation by adding section and h elements. The conceptual problem with h1-h6 headers has always been that they aren't container elements; they don't create a section, merely announce the change of section by some special rendering of the section's title. But document sections or segments are often explicitly construed as named or unnamed containers in other XML or SGML applications. With XHTML 2.0, document authors will be able to replace

<h2>Article 6. The Land.</h2>
<h3>Section 1. Terraforming Goals and Limits</h3>

with the more verbose but more expressive (because, in part, fully nestable)

<section>
<p>...</p>
<h>Article 6. The Land</h>
  <section>
    <h>Section 1. Terraforming Goals and Limits</h>
     <ol>
        <li>The primal state of Mars shall have legal 
            consideration...
        </li>
        ...
     </ol>
  </section>
</section>

This would allow, as in DocBook, for example, authors to have the flexibilty to commence a new section before announcing it; that is, the first element of a section no longer has to be its header, as in all variants of HTML to date.

Line breaks. Another point of tension between the various factions of HTML users has been the meaning and use of the br element; speaking stereotypically, designers have typically used it to force a particular rendering, while SGML and XML geeks have insisted that it should not be used in that way. The XHTML 2.0 draft seems to cut this gordian knot by simply deprecating br altogether. I say good riddance.

In the place of br, XHTML 2.0 offers line, which presently suffers from a bit of specification doggerel: "The line element represents a sub-paragraph" -- I've never met a sub-paragraph, and I'm not sure I'd be very happy if I did. What the draft means is that line can be used within a p element to indicate some constitutive part of a paragraph which should be rendered as starting on a new line and having a line break at its end.

Object über alles. img and applet are deprecated in favor of a object, which takes on a multivalent role as a kind of catch all, out-of-band media type entity. In other words, object in XHTML 2.0 is rather complex, and I haven't yet sorted out all that it can do. It is clear, however, that people won't be writing the familiar

<img src="/pix/pavonis-mons.gif" 
     alt="Approaching Pavonis Mons By Balloon" />

anymore. In its place, we'll use something like

<object data="/pix/pavonis-mons.gif" type="image/gif">
  Approaching Pavonis Mons By Balloon
</object>

At this point the type attribute seems to be optional, though it will be useful since it will give browsers some typing information with which it might make intelligent decisions about which version of an object it wants to retrieve or display.

Citing. Few HTML elements cause as much confusion or are as misused -- often by XML and SGML geeks who ought to know better -- as q and cite. XHTML 2.0 replaces q with quote, and leaves it to the author to add the appropriate inline quotation marks. cite in particular is widely thought to be a kind of synonym of blockquote, no doubt in part because of its unfortunate and misleading name. cite is supposed to markup citations: say, the title of a book from which one has quoted or to which one might refer. For instance, I have in this article been quoting from Kim Stanley Robinson's excellent little book, <cite>The Martians</cite>. XHTML 2.0 retains cite as an element and as an attribute, which has a URI as its value, and adds the cite attribute to quote. I like the use of cite as an attribute holding a URI; it's one of those stress points at which the variegated folds of Semantic and the Human Webs intersect:

<p>Robinson understood the importance
of civic involvement, enshrining it in the constitution of
his fictional Mars: <quote lang="en/us" 
cite="http://ks-robinson.info/MarsConstitution/Article5/
Section2/Part1">The citizens of Mars shall, over the course
of their lives, give one m-year of work to global service 
and the public good, such work to be defined by the 
economic commission, but never to be military or
police work.</quote></p>

Also in XML-Deviant

The More Things Change

Agile XML

Composition

Apple Watch

Life After Ajax?

It's not yet clear to me on which elements cite as an attribute is available in XHTML 2.0, but I would like to see it very widely available, perhaps joining href in the CAC. It simply cannot hurt for there to be more links in a global hypertext system, particularly typed links, and ones which offer both humans and machines other nodes on the Web at which related information may be obtained. One fly in this bit of soup, however, is the further conspicuous absence of XLink, which seems applicable to the kind of concern cite addresses.

It's clear that XHTML 2.0, despite its warts and omissions, which are by no means critically problematic at such an early stage, is a gesture in the right direction, that it gets more right than wrong. I suggest that the Working Group take its time with XHTML 2.0; given the slow adoption of XHTML 1.1, version 2.0 is not going to be used en masse anytime soon. There's no need to rush. I just hope we have browsers supporting XHTML 2.0 before someone actually needs to put a real Mars Constitution on the Web.



1 to 1 of 1
  1. nitpick
    2002-08-09 03:20:02 Robin Berjon
1 to 1 of 1