W3C home > Mailing lists > Public > www-html@w3.org > July 2005

Re: code and blockcode

From: Simon Siemens <Simon.Siemens@web.de>
Date: Tue, 12 Jul 2005 12:03:57 +0200
Message-Id: <42D3958D.9060709@web.de>
To: XHTML-Liste <www-html@w3.org>

Sorry, I guess my mail wasn't clear enough. We've talked at 
cross-purposes, as I comment in the following:

Jukka K. Korpela wrote:

>
> On Tue, 12 Jul 2005, Simon Siemens wrote:
>
>> I don't expect, that browsers do really implement a reasonable amount 
>> of languages (five was the absolute maximum I could think of).
>
I meant code languages, not spoken languages. Thus it refers to syntax 
highlighting and these things and not to the quotation problem.

>
> Browsers currently have no support to languages, except in fairly 
> technical sense like selecting a font according to language as 
> declared (which is really just a matter of mapping language codes to 
> fonts).
>
> But the rendering of language-dependent quotation marks would be 
> fairly technical too. The Common Locale Data Repository already 
> contains information on the use of quotation marks, in formalized 
> (XML) format, for a large number of languages.*) Thus, it would be 
> technically feasible now to implement <q> properly. The mainly reason 
> to objecting to it is that cannot be introduced "smoothly": when some 
> programs ignore <q> markup altogether, some program implement it 
> brutally by introducing ASCII quotation marks, there would be little 
> reason to use it on WWW pages even if some program started supporting 
> it reasonably.
>
> *) It does not cover the US English convention of putting a comma and 
> a full stop inside quotation marks even when it is not part of the 
> quoted text. But such things could be handled in an ad hoc manner 
> rather easily, I suppose.
>
> If XHTML 2 is intentionally made incompatible with all previous 
> versions of HTML and is not meant to be rendered at all on current 
> browsers (without enhancements), then <q> might make sense. 
> Semantically, it
> would let us distinguish between quotations proper (texts that have 
> actually been taken as such from somewhere, indicated using <q>) and 
> other uses of quotation marks, such as in
>   The plural of &#8220;ox&#8221; is &#8220;oxen.&#8221;
> or as irony quotes:
>   That was one of his &#8220;brilliant&#8221; ideas.
>
>> Maybe XML, because they have the parser already built in and it's 
>> rather simple.
>
>
> Pardon? Which browser? Recognition of lang attributes is no more 
> difficult than xml:lang. (Processing language codes correctly, even 
> when they have subtags, seems to have been too challenging to software 
> vendors in the past, but it's not really rocket science.)

I meant syntax highlighting for XML. XML is easier to parse and 
"understand" than e.g. C++.

>
>> The XHTML specification should not force this behavior. Drawing it as 
>> preformated text is sufficient in most cases.
>
>
> Sorry, but I can't see what you are referring to. The message you 
> quoted was about quotations and markup for them.
>
> It seems that you are referring to previous discussion on _code_ markup.
> Please do not quote such parts of a message that you definitely 
> _don't_ comment on.

The whole thread is about the code tag and the last sentence I have 
quoted took the bridge to programming languages:
"For programming languages, there will be the same kind of  difficulties 
plus the fact that the number of programming languages  keeps growing"

The whole tenor of my mail was, that the same as with q will not happen, 
because all browsers will render code like pre. The benefit of the 
additional attribute is for search engines and specific users who 
manually activate a feature for syntax highlighting. We need a 
predictable rendering for web designers, but also the additional 
semantic of such a "codelang" attribute.

>
>> On the other hand only a minor amount of sites contains code examples.
>
>
> HTML has been criticized for containing markup like code and samp, 
> which are very specialized in a sense. I think the critics have a 
> point, but
> the correct conclusion is not to remove such markup. Rather, to consider
> other needs as well. Specialized structures require specialized markup.

I don't want to remove "code" and "blockcode". I want to give it a 
better meaning by an additional semantical attribute "codelang" (that's 
totally different from xml:lang).

>
> Besides, code examples are usually not quotations but an author's own 
> code. There is already markup for them: the code element.

Yes right. We're talking about an additional attribute for the "code" 
tag and the "blockcode" tag. I should quote these words in the future to 
make clear, that I refer to a tag.

>
>> However omitting this attribute doesn't make much sense to me, 
>> because we could step back to pre then. There is no advantage for any 
>> user agent (compared to pre). And I think adding this attribute is 
>> not a huge step for us but a reasonable benefit for some user agents 
>> (as pointed out above).
>
>
> Which attribute?

The "codelang" attribute.


Sorry for my ambiguous email.

Simon
Received on Tuesday, 12 July 2005 10:04:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:03 GMT