[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re:Upcoming KDE-1.1 Release
From:       bastian <bastian () mauimail ! com>
Date:       1998-10-29 10:15:33
[Download RAW message or body]

Waldo Bastian wrote: 

| White-space immediately following a start-Tag (e.g. <Tag>) will be ignored.

| White-space immediately preceding an end-tag (e.g. </Tag>) will be ignored.


| This means that "Hello <B>World</B>" and "Hello <B> World </B>" will become

| equivalent. The hard-part is always the <PRE> tag. The parsing of the
pre-tag 
| will be as follows, if you think this is not according to the HTML-spec, 
| please let me know ASAP.

Note: white-space means spaces, tabs & LFs.

Myroslav Opyr responed:

| What about "Hello<b> World<b>"? What would I see? I want to get "Hello
World",
| but the space have to be bold (wider)... It looks like
| you strip the space at all... MS Word for example is doing things like I
| pointed all the time. I know that MS Word is not criteria, but... 

Assuming you meant "Hello<b> World</b>" that would lead to "HelloWorld".
You should write "Hello <b>World</b>" to get "Hello World". If you want a
bold space (or perhaps more useful an understriked space) you could use 
"Hello<b>&#20;World</b>". I don't think that you should do things like this
with HTML though. HTML is not intended to have total control over the
rendering. The spirit of HTML is to write "Hello <b>World</b>". 

None the less, it is a bit of a grey area, w3.org says this about it:
| B.3.1 Line breaks

| SGML (see [ISO8879], section 7.6.1) specifies that a line break immediately

| following a start tag must be ignored, as must a line break immediately
| before an end tag. This applies to all HTML elements without exception. 

Note that it talks _only_ about line-breaks. Not white-space in general.

w3.org _advises_ html AUTHORS not to use white-space after start-tags or
before end-tags since not all html-clients seem to render this the same. 
(I Couldn't find this statement again on their website)

Note that that doesn't say anything about what the html-client should do. It
is addressed to the people writing the HTML.

Netscape Communicator 4.5 (but probably all previous versions as well) does
skip
white-space (both LFs as well as spaces) after start-tags. It does not skip
white-space (neither LFs no spaces) before end-tags.

IMHO Netscape does not comply to the HTML-standard with regard to this
aspect:
It should skip LFs before end-tags but it doesn't.

So what stands is: khtmlw will skip LFs after start-tags and before end-tags.

The question is: Should khtmlw skip spaces after start-tags and before
end-tags?

KHTMLW in CVS since yesterday evening skips both LFs as well as spaces. This
can be changed though.

Opinions anyone?

Cheers,
Waldo

PS: I changed kdehelp to use "<pre>\n" instead of "<pre>" and "\n</pre>"
instead of "</pre>". This ensures that all spaces or LFs immediately
following these tags are always handled correctly.
--
bastian@kde.org  Patcher of the HTML Widget, Lord of the broken Tag

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic