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

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

From: Richard Ishida <ishida@w3.org>
Date: Tue, 19 Feb 2008 11:13:09 -0000
To: "'fantasai'" <fantasai.lists@inkedblade.net>, "'Christof Hoeke'" <csad7@t-online.de>
Cc: "'Www-style'" <www-style@w3.org>
Message-ID: <008f01c872e8$6951b240$3bf516c0$@org>

I was also wondering the same thing after reading the draft.

> I borrowed some wording from Namespaces in XML and clarified it as
> 
>      The prefix of a qualified name may be omitted to indicate that the
> name
>      belongs to no namespace, i.e. that the namespace name part of the
> expanded
>      name has no value.

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.

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.

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

RI
 

============
Richard Ishida
Internationalization Lead
W3C (World Wide Web Consortium)
 
http://www.w3.org/International/
http://rishida.net/blog/
http://rishida.net/

 
> -----Original Message-----
> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf
> Of fantasai
> Sent: 19 February 2008 03:06
> To: Christof Hoeke
> Cc: Www-style
> Subject: Re: [css3-namespace] what is a "no namespace"
> 
> 
> Christof Hoeke wrote:
> >
> > hello,
> > a comment to the last call of the CSS Namespace spec but actually I
> > always wondered a bit if it could be explained a bit more clearly what
> > "no namespace" means?
> >
> > --- another thing first:
> >
> > While writing this comment I originally had the following thought:
> >
> >     In XML no namespace means
> >      1. elements with no prefix and no default namespace in the
> > enclosing document/element
> >      2. elements resetting a default namespace defined in the enclosing
> > document/element with::
> >
> >     <x xmlns="">...
> >
> > Using this simple logic it would be allowed to define::
> >
> >     @namespace empty "";
> >
> > to select element x from above with::
> >
> >     empty|x
> >
> > But in XML the empty string is not allowed when defining a namespace
> > with a prefix (http://www.w3.org/TR/xml-names/#iri-use), only when
> > defining the default namespace (if I understand
> > http://www.w3.org/TR/xml-names/#defaulting right).
> >
> > So the above should not be valid in CSS either I guess?
> > The syntax does not prevent this though and no comment is there either
> > (maybe I overlooked it?).
> 
> Added to the issues list. Anne or I will get back to you on this one.
>    http://dev.w3.org/csswg/css3-namespace/issues-2
> 
> > Anyway, I also think the term "no namespace" should be more explicit. In
> > an very old draft
> > (http://www.w3.org/1999/06/25/WD-css3-namespace-19990625/#tag-selector)
> > I found the sentence:
> >
> >     The namespace component may be left empty to indicate that the
> > selector is only to match elements with no declared namespace
> >
> > Maybe the single word "declared" could be re-added to
> > http://www.w3.org/TR/css3-namespace/#css-qnames to make this clearer?
> 
> I borrowed some wording from Namespaces in XML and clarified it as
> 
>      The prefix of a qualified name may be omitted to indicate that the
> name
>      belongs to no namespace, i.e. that the namespace name part of the
> expanded
>      name has no value.
> 
> Does that work for you?
> 
> ~fantasai
Received on Tuesday, 19 February 2008 11:09:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:01 GMT