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

Re: code and blockcode

From: Christophe Strobbe <christophe.strobbe@esat.kuleuven.be>
Date: Mon, 01 Aug 2005 15:44:30 +0200
Message-Id: <6.0.0.22.2.20050713141357.02fdf478@mailserv.esat.kuleuven.be>
To: www-html@w3.org

Hi Laurens,

At 13:24 13/07/2005, Laurens Holst wrote:

>Christophe Strobbe wrote:
>
>>>Who says that it must be a quote? Are you saying I canĂ¢€™t make
>
>>>original poems myself?
>>
>>I was only providing examples of cases where line numbering makes sense 
>>outside the context of computing. For original poetry where whitespace 
>>matters, you can use normal paragraphs with white-space:pre or you can 
>>use the xml:space="preserve" attribute.
>
>Well yes. By that reasoning, <em> is also not necessary, because I can use 
>normal spans with font-style:italic.

No, unless you say that <pre> is semantic in the same way that <em> is. I 
argued that <pre> can be replaced with a semantic element (plus CSS), 
whereas your example implies that I argued the opposite.


>xml:space="preserve" by itself will not achieve the desired effect, it 
>only controls how whitespace ends up in the DOM.

The XML spec[1] says nothing about the DOM, obviously, because the DOM spec 
[2] was created after the XML spec. The 3rd edition of the XML spec says 
that 'the value "preserve" indicates the intent that applications preserve 
all the white space', i.e. applications, not just XML processors (be they 
DOM, SAX, JDOM, XOM,...). XML processors must always pass all characters 
that are not markup to the application.


>>I have no issue with the blockcode element, but since we have CSS and 
>>xml:space, I wonder why the XHTML WG wants to keep the pre element and 
>>introduced the layout attribute [1].
>
>xml:space does not do what you think it does.

That is not because xml:space only controls how whitespace ends up in the 
DOM (as you say), but because the XML spec says only that "A special 
attribute named xml:space MAY be attached to an element to signal an 
intention that in that element, white space *should* be preserved by 
applications.": lowercase 'should' instead of RFC2119 'MUST'.

>It is additionally already set to that value on all elements in XHTML 2.0. 
>See also: http://www.w3.org/MarkUp/2004/xhtml-faq#xmlspace

The FAQ does not count, only the specification counts, and I can't find how 
xml:space is used there.


>>>As another example, consider ASCII art. It is definitely preformatted. 
>>>It definitely isn't code, and definitely shouldn't have numbered lines.
>>
>>1. No one ever said that poetry or ASCII art should have line numbers. 
>>There are use cases where line numbering for poems and other literary 
>>text are useful.
>>2. I haven't seen any ASCII art for ages. It seems like a relic of the 
>>nineties; web developers now have much better technologies for visual 
>>information at their disposal. Can you provide three examples of ASCII 
>>art available on the Web today?
>
>Oh, certainly. Your impression is totally off!
>
>http://www.google.com/search?q=ASCII+art
>1,550,000 results.

Very funny. Yes, my impression was wrong, and I now remember that even some 
W3C documents use it, but...

1. You should have queried for "ASCII art" (with quotes): 
http://www.google.com/search?hl=en&lr=&q=%22ASCII+art%22&btnG=Search. 
881,000 results (somewhere between 3 and 1,550,000).

2. The top results are about ASCII art for the sake of ASCII art, not for 
any useful purpose. That's why I don't see a lot of ASCII art when I'm 
using the Web.

3. I can also play the numbers game. Here are some results for the 
alternatives. Even technologies that require a plug-in generate more 
results than ASCII art:

GIF: http://www.google.com/search?hl=en&lr=&q=GIF&btnG=Search
152,000,000 results.

JPEG or JPG: http://www.google.com/search?hl=en&lr=&q=JPEG+OR+JPG&btnG=Search
80,100,000 results.

PNG: http://www.google.com/search?hl=en&q=PNG&btnG=Google+Search
13,900,000 results.

Flash: http://www.google.com/search?hl=en&lr=&q=Flash&btnG=Search
127,000,000 results.

SVG: http://www.google.com/search?hl=en&lr=&q=SVG&btnG=Search
6,670,000 results.





[1] http://www.w3.org/TR/1998/REC-xml-19980210 (10 February 1998)
[2] http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001 (1 October 1998)

Regards,

Christophe


>~Grauw
>
>--
>Ushiko-san! Kimi wa doushite, Ushiko-san!!
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Laurens Holst, student, university of Utrecht, the Netherlands.
>Website: www.grauw.nl. Backbase employee; www.backbase.com.

-- 
Christophe Strobbe
K.U.Leuven - Departement of Electrical Engineering - Research Group on 
Document Architectures
Kasteelpark Arenberg 10 - 3001 Leuven-Heverlee - BELGIUM
tel: +32 16 32 85 51
http://www.docarch.be/  
Received on Monday, 1 August 2005 13:45:31 GMT

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