Anne van Kesteren

XHTML 2.0 Spec summary

XHTML2.0 what changes, what do I like and what do dislike. I will also add some links at the bottom of this page for related info and alternative visions about this new great thing. (Yes that was an opinion).

This is about the draft from 6 May 2003. Things will change in the future, but having a look at it isn't wrong and gives us a idea how thing are going to be in the future. XHTML2.0 will be more module based. It will use other XML applications to do jobs, like Xframes and XML Events. XHTML2.0 goal is to have go back to the roots of HTML. Making markup the way it was! And I definitely like that for sure.

Since XHTML2.0 is in fact XML there will not only be a DTD but also a XML Schema. It also has a new NS, XHTML1.0 (and 1.1) have (had) http://www.w3.org/1999/xhtml, but XHTML2.0 has http://www.w3.org/2002/06/xhtml2 and that's very unlikely to change.

The first thing which you'll notice that's new in the specification is the Edit collection [6.4]. There are two attributes for this edit and datetime these can be applied to any element as for as I know. Edit can have the following values (separated by a |): inserted|deleted|changed|moved. I think these values speak for themselves. New is that deleted should be set to display:none; by default. Now I use the element del for which the default style is text-decoration:line-through;, which I like better, but hey we have stylesheets for this!

Also a big change: href can be applied to any element! I will come back to this later. tabindex has changed to navindex, which is more semantic since not every device has a tab on it's keyboard (if they have a keyboard at all). But this will also be a part of CSS3 ( CSS3 Basic User Interface Module, 8.2 ). Another new attribute is xml:base which can be applied to any element. Example (directly taken from the spec):

<ul xml:base="http://www.w3.org">
<li href="/">The W3C home page</li>
<li href="/TR">The W3C Technical Reports page</li>
<li href="/Markup">The HTML home page</li>
<li href="/Markup/Forms">The XForms home page</li>
</ul>

Seeing the options this will give us? Oke I'll skip some parts and continue at XHTML Block Text Module [8]. There is an interesting new element called blockcode and it's not the same as I use now (at least I think it will not be the same), but there isn't much information about it. Also new are the elements h and section, with these elements author's can't skip any headers anymore in their "semantic" documents. hr may be replace by seperator, it's the same for me, as long as they describe it's function properly I think hr will be fine.

About the inline text modules I can be quite short. acronym is removed and abbr is now available for every abbreviation. Damn that's going to be a lot of search and replace by then, however most of my abbreviations are done with abbr and otherwise: I make a XHTML1.1 archive and continue in XHTML2.0. q is replaced by quote, where no default style is added by visual UAs. One final note about this module: br is gone, forever! Finally it's gone and is replace by the much more semantic l (which is not(!) an open element according to HTML4.01).

Skipping 10 we arrive at module 11 the XHTML List Module. Two new elements are defined here nl and label. Especially nl might be the most exciting new element in XHTML2.0. The label sits inside of the nl element. If label is selected the containing li elements within the nl are shown. But wait there is more. A li element can contain another list and so on. This is cool stuff! And since this is XHTML 2.0 the li element can contain the attribute href. An example:

<nl>
 <label>Contents </label>
  <li href="#introduction">Introduction</li>
  <li>
   <nl>
    <label>Terms</label>
     <li href="#may">May</li>
     <li href="#must">Must</li>
     <li href="#should">Should</li>
   </nl>
  </li>
  <li href="#conformance">Conformance</li>
  <li href="#references">References</li>
</nl>

XHTML Object Module [14]. I'll just say it: img is out, object is one of the alternatives. We can't use img anymore. object exists since HTML 4, but it's never widely used an thus supported. There are some fixes for that, just follow the links at the end of this post, but hey it's not supposed to be truly backwards compatible, it want to bring HTML back to it's roots and there is no room for stuff like img there! I should use object to for the images, but I won't do it now since IE support is really, really bad for object. An alternative to object is to include the attribute src into an element like this:

<p src="boot.png" type="image/png">Today we went sailing.</p>

The content from the element p should not be rendered by visual UAs. The image should be shown. The rest is not very interesting, maybe I tell you about it later or you could just read it yourself. The promised hyperlinks (some may be given in earlier posts):

So that was it, I need a vacation! And I'm going tomorrow, what a coincidence :)