Re: SVGT 1.2: A proposal for how to define SVG whitespace in terms of CSS whitespace

On Jan 31, 2006, at 12:13 AM, Bjoern Hoehrmann wrote:

>
> * Maciej Stachowiak wrote:
>> Well, XHTML, MathML, and CSS as applied to an arbitrary XML
>> application all failed to interpret it this way. Do you know of any
>> w3c language besides SVG that interprets it to have a presentational
>> effect?
>
> Well, in XHTML we already have
>
>   <!ATTLIST pre
>     %attrs;
>     xml:space (preserve) #FIXED 'preserve'
>>
>
> Now, do browsers preserve white space in <pre>? :-)

I'm assuming from the smiley that you mean this half-jokingly, but  
let's take it seriously for the sake of argument.

First, let's check what the XHTML 1.1 spec requires for white-space  
presentation:
"The user agent must use the definition from CSS for processing  
whitespace characters [CSS2]. Note that the CSS2 recommendation does  
not explicitly address the issue of whitespace handling in non-Latin  
character sets. This will be addressed in a future version of CSS, at  
which time this reference will be updated."

So, it depends on what stylesheet you are using. CSS2 recommends the  
following in a UA stylesheet for HTML4 (in a non-normative appendix):

PRE             { white-space: pre }

But of course, a user stylesheet or author stylesheet could override  
this. And no spec requires visual UAs to include this rule in their  
UA stylesheet for XHTML or to act as if they do (oddly enough!).

None of this has anything to do with "xml:space", which has  
absolutely no effect either on pre or on any other element in major  
XHTML UAs. White-space presentation for XHTML is entirely controlled  
by CSS properties, not by xml:space.

Regards,
Maciej

Received on Tuesday, 31 January 2006 09:45:13 UTC