The already infamous rant from Mark Pilgrim highlights a larger issue: when designing a markup language like XHTML 2.0, how does one decide what to include and what to leave out?

Listening to those who ultimately will use the technology is, of course, critical. The trouble is, that different users have different (and quite often contradictory) requests.

More is needed than just “listening”. There has to be a guiding princicple. The word ’semantics’ is often used in this context, but it has unfortunately become overused and hard to define. A better way to describe the principle is:

A markup language should describe the author’s intent.

This principle immediately clarifies countless cloudy issues. Daniel Glazman blogs about how he laments the <br> element, with this example:

<p>Combien sont ces six saucissions-ci ? Ces six saucissons-ci sont six sous.<br/>Si ces six saucissons-ci sont six sous c’est six sous trop cher!</p>

To analyze this, one needs to ask what the <br> element is inteded to accomplish. If the answer is ‘I inded for a line break to appear there!’, there’s a good indication that you’re addressing the wrong level. What would, for example, a voice browser expect to do with the <br>? At too specific a level, one ends up with presentation instead of intent.

Another contentious area is around how to provide linking properties in a general way. Again, the answer is to let the author describe their intent in a general way, as I described in a skunkworks XML linking proposal.

A few more examples. Should there be a a <hr>-like element, perhaps called <separator>? Yes, because separating two different pieces of text is an intent, one that can be readily rendered on the screen, voice, or print. Similarly, proposals for an attribute named xml:id fit in with the idea of exprssing intent.

All in all, XHTML 2 is still growing and changing. The answer isn’t to push it aside, throw it away, nor even to rename it.

XHTML 2 hasn’t radically changed recently. The best way forward is to stay the course. XHTML 2 needs a better-defined goal (ideally a requirements document), and continuous, incremental movement towards the goal. -m

How do you express intent?