W3C home > Mailing lists > Public > www-style@w3.org > February 2008

Re: [css3-namespace] what is a "no namespace"

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 19 Feb 2008 12:54:41 +0100
To: "Richard Ishida" <ishida@w3.org>, "'fantasai'" <fantasai.lists@inkedblade.net>, "'Christof Hoeke'" <csad7@t-online.de>
Cc: "'Www-style'" <www-style@w3.org>
Message-ID: <op.t6rspfz264w2qv@annevk-t60.oslo.opera.com>

On Tue, 19 Feb 2008 12:13:09 +0100, Richard Ishida <ishida@w3.org> wrote:
> I think that clarifies the meaning wrt the syntax, but it's still not  
> clear to me in what circumstances you would need to use this.

  <x xmlns="x">
   <y xmlns=""/>

To select y you'd use either

   @namespace foo "";
   foo|y { ... }


   |y { ... }

> Also, I found myself wondering whether this means that we have to change  
> all style sheets for XHTML files, where the html element defines a  
> default
> namespace, so that the selectors match xhtml elements.

No. By default type selectors match elements in every namespace. So

  html { ... }

works for

   <html xmlns="x"/>


   <html xmlns="http://www.w3.org/1999/xhtml"/>

or (in HTML):


Note that most browsers, for CSS purposes at least, already act as if HTML  
elements are in the http://www.w3.org/1999/xhtml namespace.

> I guess I'm looking for information about how this is applied along with  
> the syntactic description.

Why? It's pretty self-evident. (If the namespaces concept of XML  
namespaces is itself not clear, which seems to be the problem here, I  
suggest simply not bothering with them. Namespaces are hardly relevant on  
the Web anyway.)

Anne van Kesteren
Received on Tuesday, 19 February 2008 11:50:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:34 UTC