- From: Maciej Stachowiak <mjs@apple.com>
- Date: Wed, 17 Mar 2010 16:03:49 -0700
- To: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
- Cc: Jonas Sicking <jonas@sicking.cc>, "Ennals, Robert" <robert.ennals@intel.com>, Ian Hickson <ian@hixie.ch>, HTMLwg <public-html@w3.org>
On Mar 17, 2010, at 7:26 AM, Leif Halvard Silli wrote: >> I could be misunderstanding, but my reading of Robert's Proposal X is >> that it would always place attributes in the namespace specified by >> the relevant xmlns declaration, regardless of whether the browser has >> special knowledge of a particular prefix. (Or if there is no >> namespace declaration in the document, the attribute would end up in >> the null namespace). Thus, which of the above selectors matches would >> be consistent in all browsers for any given document, assuming all >> browsers implement Proposal X. > > I read what he says. I claim that it isn't as he (and you) say. > > Let's say we have a Webkit specific style attribute: > > -webkit:style="color:red" > > I suppose internally, Webkit would use its regular CSS interpreter. > Hence Webkit see this attribute as being in the "@style namespace". > Whereas other vendors do not. I don't see any reason to conclude that. We wouldn't make "chameleon" versions of existing attributes in a vendor namespace. > >>> Effectively, in text/html, then a vendor specific namespace could be >>> implemented without the use of a prefix - one could simply do this: >>> >>> <div -wexbkit="value"> >>> >>> Those that support the -webkit namespace could then see it (in >>> CSS) as >>> >>> [*|-webkit] >>> >>> Or as >>> >>> [webkitnamespace|-webkit] >>> >>> whereas the others could target it as >>> >>> [-webkit] >> >> Robert's Proposal Y would not place prefixed attributes in a >> namespace (other than the null namespace). Thus, in all browsers, >> only an attribute selector with no prefix specified would match. > > So effectively, it would not be a vendor specific prefix? It is all > just a promise from the other browsers: "No, we will not react to > [-webkit] even if we see it" ? I'm not sure I understand your example any more, but a Proposal Y style attribute such as -webkit-foo would have a prefix in the normal English sense of the word (something that appears at the beginning of a string) but not in the XML sense. Its localName would be "-webkit- foo", its prefix would be empty, and its namespace URI would be null. The purpose of the prefix is to avoid namespace collisions between different vendors. But it achieves that without using the Namespaces in XML mechanism at all. Regards, Maciej
Received on Wednesday, 17 March 2010 23:04:23 UTC