W3C home > Mailing lists > Public > www-style@w3.org > September 2013

Re: [selectors4] List [xml:lang] and [xmlns] as selectors that do not work in XML

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Wed, 25 Sep 2013 20:09:01 +0200
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Simon Sapin <simon.sapin@exyr.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <20130925200901048483.7756fa47@xn--mlform-iua.no>
Tab Atkins Jr., Wed, 25 Sep 2013 10:34:19 -0700:
> On Wed, Sep 25, 2013 at 10:16 AM, Leif Halvard Silli wrote:

> This has nothing to do with xml:lang - all namespaced
> attributes work like this.

Indeed. However xml:lang is common. That’s why I took it up.

>>>> Proposal: Please add a note/info that mentions @xml:foo and @xmlns as
>>>> examples of common attributes that cannot, when occurring in a XML
>>>> document, be styled with a simple [att]{} selector. It helps authors to
>>>> understand the concept if they see an actual, non-theoretical, example.
>>>> [1] http://dev.w3.org/csswg/selectors4/#attrnmsp

>>> I find this @xmlns parsing oddity more confusing than helpful in
>>> understanding namespaces.
>> Well, if it is confusing, then that *too* is a reason to offer
>> explanation in the spec.
> Well, not necessarily.  Bizarre quirks of individual languages that
> authors are highly unlikely to run into don't necessarily need to be
> explained in the CSS spec.  They should be if they're something
> authors are likely to run into, but styling based on an xmlns
> attribute seems rare. ^_^

Despite your description of this feature as a "bizarre quirk", the 
Selectors 4 spec *defines* how to operate with namespaces for [foo] 
selectors.[1] You don't make that section *less* relevant by showing 
how to apply that section to @xmlns and xml:@lang - the most commonly 
seen namespaced attributes in HTML and XHTML today.

Besides, in (X)HTML5, the common thing is default namespaces. And the 
shape of @xmlns is no different from the shape of @class - for 
instance, Thus, it is quite likely, IMHO, that authors could run into 
and start to wonder why that works in HTML but not in XML. I don't want 
you to explain how to do e.g. 
it should be enough to show

But it is of course up to you, the editors, if you want to add it. :-)

[1] http://dev.w3.org/csswg/selectors4/#attrnmsp

leif halvard silli
Received on Wednesday, 25 September 2013 18:09:33 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:32 UTC