Re: problem with msxml

Christophe PARIS <[email protected]> Sat, 01 Mar 2003 00:22:50 +0100
Newsgroups gmane.comp.multimedia.usf.devel
Message-ID <[email protected]>
Hi Gabest,

Handling space is a bit tricky.
I think that the best way to handle space is to compress spaces.
You replace all consecutive spaces, carriage return, new line, 
tabulation by 1 space.
It's handled like that in Mozilla and in IE.

On this example :
"        Hello<b>        world!</b> How          
are you ?      "

You should get :
"Hello<b>_world!</b> How_are you ?"

_ represent compressed space.
Also you can see that all spaces has been trimed before "Hello" and at 
the end.

A bit harder, with :
"Hello     <b>     world!</b>"
You should finally get only 1 space between "Hello" and "world!"
(I think it's not true in my implementation in The Core Media Player)
Does the space should be bold or normal ? I don't know ;)

Best regards
Toff

Gabest wrote:

>I was a bit wrong on this. Since the lines have a few dozens of spaces in
>front of them, the result looks like this:
>
>"Red,
>                        Green,
>                        Blue"
>
>This makes me think that trimming white space is indeed necessary, but what
>to do with those spaces before and after the tags? Should the creator use
>&nbsp in that case?
>

http://usf.corecodec.org