If you're mixing XML and HTML, you should just enclose the HTML inside
of CDATA tags, then it's not an issue as any proper XML parser will
ignore it as XML structure and treat it as a string.


Jason Merrill 

 Bank of  America  Global Learning 
Learning & Performance Soluions

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(note: these are for Bank of America employees only)





-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Greg
Ligierko
Sent: Tuesday, November 17, 2009 1:12 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Intersecting (or ovelapping) <b> and <i> in
htmltext fields

You are all right. Mixing styles this way breaks HTML/XML hierarchy
and it's not a good idea. I am writing a piece of code that converts
[b]..[/b] and [i]..[/i] to HTML bold and italic tags. I was trying to
figure out if I should allow intersecting styles. For some reason,
browsers support this but obviously I should not.

Thanks,
Greg


Tuesday, November 17, 2009 (2:42:17 PM) Nathan Mynarcik wrote:

> Yeah, "intersecting" if you will, is improper HTML coding. I can't
> even think of a reason why you would want to do that...

> ------Original Message------
> From: Karl DeSaulniers
> Sender: flashcoders-boun...@chattyfig.figleaf.com
> To: Flash Coders List
> ReplyTo: Flash Coders List
> Subject: Re: [Flashcoders] Intersecting (or ovelapping) <b> and <i> in
htmltext fields
> Sent: Nov 17, 2009 6:37 AM

> Should be like this..

>>> var test2 = "A B C D <B> E F G <I> H I J K </i></B> <i>L M N O </ 
>>> I> P Q R S T";

> if you want these results.

>>>                A B C D   - regular font
>>>                E F G     - bold
>>>                H I J K   - bold+italic
>>>                L M N O   - italic
>>>                P Q R S T - regular font

> Karl

> On Nov 17, 2009, at 6:30 AM, Andrei Thomaz wrote:

>> intersection is not "correct" HTML, right?
>>
>>
>>
>> On Tue, Nov 17, 2009 at 10:03 AM, Greg Ligierko <gre...@l-d5.com>  
>> wrote:
>>
>>> I noticed a difference in how Flash CS3 and simple HTML page parses
>>> <b> and <i> tags.
>>>
>>> For example:
>>> var test2 = "A B C D <B> E F G <I> H I J K </B> L M N O </I> P Q R  
>>> S T";
>>> txt.htmlText = test2;
>>>
>>> Flash produces: A B C D   - regular font
>>>                E F G     - bold
>>>                H I J K   - bold+italic
>>>                L M N O   - bold+italic
>>>                P Q R S T - bold
>>>
>>> (it completely ignores the closing </B> tag).
>>>
>>> While using the same string, pure HTML produces (as we could
expect):
>>>                A B C D   - regular font
>>>                E F G     - bold
>>>                H I J K   - bold+italic
>>>                L M N O   - italic
>>>                P Q R S T - regular font
>>>
>>> (clearly considers closing bold </B>).
>>>
>>>
>>> Conclusion - Flash allows nesting <b><i>...</i></b>, but does not
>>> allow intersecting two style formatting, like <b>...<i>...</b>..</i>
>>> (I'm not sure if "intersection" is an appropriate word in this
case).
>>>
>>> Am I right here ?
>>>
>>> g


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to