Re: samp, kbd, var

On Tue, 22 Aug 2006, Toby Inkster wrote:

> What are these elements still doing in XHTML 2?

The XHTML 2 draft looks like a big compromise. (Compromise: a decision 
that combines the drawbacks of several alternatives.)

> They're an anachronism!

Not really; just a holdover.

> <samp>Hello World</samp> => <q role="compsci:outputScreen">Hello World</q>

Sample output need not appear on screen. Besides, is it really _quoted_? 
>From where?

> <var>i</var> => <code role="compsci:variable">i</code>

Some automatic translation programs recognize <samp> and/or <code> markup 
and treat the element's content as something that shall not be translated.
I can imagine why (though I don't agree about <samp>): these elements
have mostly been used by their good old HTML definitions, which are 
semantically relatively clear, so programs can actually make some use of 
them and avoid foolishness like translating command and function names 
when processing a text that mentions them. Does anyone honestly expect 
programs to do such things with role="..." attributes?

> <kbd>Alt + X</kbd> => <span role="compsci:inputKey">Alt + X</span>

If essential semantic distinctions are made on the basis of attributes 
rather than element names, wouldn't it be natural to use just one element 
name, say <a>?

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Tuesday, 22 August 2006 08:21:12 UTC