Re: CDATA, Script, and Style (was: Input on the agenda)

Heya Doug,

On Mar 18, 2009, at 20:54 , Doug Schepers wrote:
> Robin Berjon wrote (on 3/18/09 6:10 AM):
>> On Mar 18, 2009, at 09:24 , Jonas Sicking wrote:
>>> It would be great if we could allow the same set of tags to affect  
>>> the
>>> parser the same way in both HTML mode and in foreign content mode.  
>>> The
>>> only two tags that seem troublesome here is <script> and <style>. It
>>> sounds like it might possibly might be agreement that it would be
>>> possible to parse <script> as CDATA, which would leave <style> as  
>>> the
>>> only remaining controversial tag.
>>
>> I think it could be acceptable to break <style> for SVG.
>
> No, it wouldn't.

Let me clarify that and put it in the context in which I meant it:  
given a trade-off between breaking a *subset* of the uses of <style>  
in SVG and providing inconsistency for <style> authoring in an HTML  
context, the former is IMHO acceptable.

Unless I'm mistaken, the context of this discussion is SVG-in-HTML and  
(perhaps, pending on other resolutions) SVG served as text/html. It  
doesn't apply to XML SVG served as image/svg+xml. I understand that  
there's the cut-and-paste issue, but one can't just cut-and-paste most  
SVG documents as removing the XML declaration and DOCTYPE (which do  
tend to be present even if useless in most cases) would at least be  
required.

>> While <script> is commonplace, <style> is pretty rare as
>
> No, it's not.

That's not my experience but since I don't have numbers and neither do  
you, can we at least agree that the existing set of SVG documents that  
do use <style>, that use <style> content in the limited ways that  
would actually break (as detailed by Jonas and others), and that might  
either be served as text/html and or copy-pasted into an HTML document  
with informed modifications to their prologs but not to their <style>  
elements is, even without numbers, likely to be pretty small?

>> 2) using CSS for SVG is only useful in some limited cases,
>
> But for those cases, it's very useful, and the cases aren't as  
> limited as you suggest.  The SVG WG is also considering making CSS  
> more applicable to SVG, to help authors who come from a CSS world.

Making CSS more useful in SVG is a very laudable goal, but presumably  
it only covers documents that will be authored after said improvements  
are specified and implemented, so I'd like to keep those outside of  
this specific loop.

> In my experience, because of the PI mechanism, most CSS in inline in  
> a <style> element.  It would be easier and more consistent with HTML  
> content if the SVG spec added a link element, as I've mentioned  
> elsewhere. [1][2][3]  I'm interested to hear if this would cause a  
> conflict in inline SVG in HTML, if the SVG WG defined it such that  
> it has the same syntax and behavior as in HTML?

It would be nice indeed, and has been desired in one form or another  
since antiquity (sorry, member-only I'm afraid):

   http://lists.w3.org/Archives/Member/w3c-svg-wg/2003AprJun/0078.html

I'm all for adding <link> to SVG by making it a shortcut to  
<html:link>. Would that involve somehow deprecating the xml-stylesheet  
PI?

-- 
Robin Berjon - http://berjon.com/
     Feel like hiring me? Go to http://robineko.com/

Received on Wednesday, 18 March 2009 20:26:53 UTC