code and blockcode

Up to now blockcode is rather the same as pre. I don't see any advantage.

However, adding an attribute codelang, which has values like perl, 
xhtml, matlab, java, ..., would give it the intended meaning. This would 
enable

    Browsers to provide syntax highlighting
    in addition to the preformated layout

    The upcoming search engines for programming code
    to have a much easier life and do a better job

    Voice user agents to improve the given speech, e.g.
        if ( a==b){ a=1;}
    For now a german machine would probably say (translated)
       i f brackets opened a equals equals b brackets closed ....
    Knowing the language it could say
       if a equals b then set a to one.

What would be needed is an (open) list of languages. As we could never 
list all possible languages, a naming guide should be supplied, so that 
it is very likely, that two people thinking of the same language use the 
same value. For the most popular languages a fixed list is provided. 
Maybe something like versioning should be incorporated as well (say 
"java-1.5" or "sql-2000", where the text in front of "-" is the code 
language and the text after "-" is the version).


A second concern (less important) are the (propably often discussed) 
tags kbd, var, samp. We don't have anything like this in the Struktural 
Module (but we have code and blockcode). For me kdb, var and samp are 
some special kind of code. Obviously this is the case for say LaTeX, the 
perl-interpreter, MATLAB, ... Since code is a specially defined way to 
provide information almost every input and output is some kind of code. 
And I don't see any advantage for user agents of any kind that goes 
beyond the knowledge, that this text is some kind of code. So what about 
a substition by the code tag extended with a/the role-attribute?

Regards, Simon

Received on Monday, 11 July 2005 09:48:44 UTC