Re: Distributed Extensibility

On Sat, 04 Aug 2007 17:11:15 +0200, Sam Ruby <rubys@us.ibm.com> wrote:

>>  Sorry about being thick, but I'm still not sure what changes you are  
>> suggesting to CDATA tokenization.
>
> Given this input:
>
>    <p><![CDATA[x]]></p>
>
> HTML5 current interprets that exactly the same as:
>
>    <p><!--[CDATA[x]]--></p>
>
> I'm proposing that given this input:
>
>    <o:p><![CDATA[x]]></o:p>
>
> HTML5 would treat that as:
>
>    <o:p>x/o:p>

The use-case for this is to hide text inside embedded SVG from IE. [1]

Using the above construct will also hide the text from Safari and Firefox  
(which I guess is the intension), but not Opera.

Assuming that "<svg:svg>" ends up in the DOM with the localName "svg" in  
HTML5-aware UAs (with your proposal), it is possible to hide such text  
 from legacy UAs (and IE) with:

    svg\:svg { display:none; }

...which avoids the need for special-casing "<![CDATA[". Furthermore, it  
will achieve the intended result in Opera, and you can use characters such  
as [, ] and > in the text. [2]

[1] http://www.w3.org/mid/46B35F07.6050603@us.ibm.com
[2] http://www.w3.org/mid/46B22F81.8020708@zaynar.demon.co.uk
-- 
Simon Pieters
Opera Software

Received on Saturday, 4 August 2007 15:33:13 UTC