White space and inline elements (was: Re: HTML fixes (3rd time sent lucky))

* Eric wrote:
>that gets changed to
>          <a href="page1.html">
>            <img src="images/next.gif" alt="Take me to  page one please"
>            width="55px" height="25px" />
>          </a>
>
> so that when you click onto it, you see a bent gray line on the bottom
>right side of the picture.

XHTML 1.0 doesn't say anything about how leading and trailing
whitespace [1] should be treated for inline elements. E.g.

  <p> This   is <em> very </em> important! </p>

and

  <p> This   is<em> very </em>important! </p>

I suggest to add a new item to section 3.2 of XHTML 1.0 that reads e.g.

[...]
  * Leading and trailing whitespace inside an inline element must be
    moved outside the element content (except when the 'xml:space'
    attribute is set to 'preserve')
[...] [2]

Then the above examples become

  <p>This is <em>very</em> important!</p>

and

  <p>This is <em>very</em> important!</p>

after white-space normalization. Otherwise the mentioned behaivour would
be rather conforming and I see no use of this, it's just annoying.

I could think of a case like

  <p>Personal signatures in usenet articles and emails should be
     delimited by <code>-- </code>.</p>

but this information would be lost e.g. when wrapping lines. But to
preserve this case 

[...]
  * Leading and trailing whitespace inside an inline element must be
    moved outside the element content if it's followed by a whitespace
    outside the element content or by the end of the containing block
    element (except when the 'xml:space' attribute is set to 'preserve')
[...]

[1] Is it "white space", "white-space" or "whitespace"? I see all three
    versions in W3C Technical reports...

[2] The recommendations implies in the way it mentions (or doesn't
    mention) the xml:space attribute, that one may set it on most
    attributes or that it could be set to some different value than
   'preserve', maybe this should be also clarified

x'mailed to www-html-editor@w3.org.
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/

Received on Tuesday, 24 July 2001 17:15:52 UTC