I am a little confused as to the correct parsing of white space, and the
html specification is not very clear on this.
I am specifically interested in something like the following:
<p><b>blah </b><i> </i><strike> text
The html spec says:
>For all HTML elements except PRE, sequences of white space separate
>"words" (we use the term "word" here to mean "sequences of non-white
>space characters"). When formatting text, user agents
>should identify these words and lay them out according to
>the conventions of the particular written language (script)
>and target medium.
Refering to the above example, b has only one word as does strike, implying
there should be no separators, and that it can treated as:
<p><b>blah</b><strike>text
But this is obviously wrong, instead it would appear that in the context of
p there are two words, and should be rendered as either:
<p><b>blah </b><strike>text
or
<p><b>blah</b><strike> text
or even
<p><b>blah</b><i> </i><strike>text
The question is, which one is write? What rules are there for determining
what the scope of whitespace are (in the following example I had to look at
p to determinie the scope for whitespace.
Are there any definitive rules as to how to handle collapsing of
whitespaces?
Thanks,
-Scott (zoz32@hotmail.com)
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com