W3C home > Mailing lists > Public > www-style@w3.org > October 2009

Re: [cssom] serializing Selectors

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 19 Oct 2009 14:51:44 +0200
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "L. David Baron" <dbaron@dbaron.org>, "Maciej Stachowiak" <mjs@apple.com>, "Travis Leithead" <travil@microsoft.com>, "CSS WG" <www-style@w3.org>
Message-ID: <op.u11soiwf64w2qv@annevk-t60>
On Mon, 19 Oct 2009 14:44:16 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 10/19/09 7:47 AM, Anne van Kesteren wrote:
>> [*|ATTR]
>> ends up as
>> [attr] in Firefox and Opera and
>> [*|attr] in WebKit
>> for a text/html resource. Neither seems ideal.
> For what it's worth, in trunk Firefox it ends up as [ATTR] if nothing  
> else is going on, and this is independent of the kind of resource.  I  
> believe the HTML5 requirements on selector matching (and in particular  
> the requirement that the SVG and MathML be matched case-sensitively)  
> implies that round-tripping case should not be a huge burden on  
> implementations.  Certainly that's why we started doing it.
> As for the fact that the "*|" disappears, Gecko in general doesn't  
> serialize the "ns|" part of selectors in cases where the namespace is  
> the stylesheet's default namespace.  This could be changed if really  
> needed but that doesn't seem to be worth the extra bookkeeping to me.  
> Are there particular problems with this approach, as long as people  
> don't move the selectors between stylesheets with different default  
> namespaces?  And if they do that, they'd lose anyway with unprefixed  
> selectors, right?

My bad for testing with Ubuntu's default. I have 3.7a, but sometimes I  
forget to use it. Always preserving case and having the  
case-insensitiveness in matching sounds good to me.

In this case losing *| is problematic if you have one or more attributes  
named ATTR that are in a namespace. This is different for elements of  
course, where *| is the default, unless there is a default namespace  

Anne van Kesteren
Received on Monday, 19 October 2009 12:52:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:29 UTC