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: Wed, 20 Feb 2008 11:31:50 +0100
To: "Christof Hoeke" <csad7@t-online.de>
Cc: "Richard Ishida" <ishida@w3.org>, "'fantasai'" <fantasai.lists@inkedblade.net>, "'Www-style'" <www-style@w3.org>
Message-ID: <op.t6tjjcjz64w2qv@annevk-t60.oslo.opera.com>

On Wed, 20 Feb 2008 11:09:04 +0100, Christof Hoeke <csad7@t-online.de>  
wrote:
> Anne van Kesteren wrote:
>>  It is in XML 1.1. And there's talk of backporting that to 1.0. Anyway,  
>> what makes you think this is an issue?
>
> I did not know about XML 1.1 had changed that (XML 1.1 which I guess  
> should be seen as a failure as the current discussion on XML-dev about  
> XML 2.0 shows).

No disagreement there. XML 1.1 is a failure. But backporting xmlns:foo=""  
to XML 1.0 makes sense.


> Anyway, it would/will be an issue if XML and CSS handle namespaces  
> differently and regarding XML 1.0 and current CSS they do:
>
> 	XML:
> 		<example xmlns:empty=""/>
> 		=> invalid
> 	CSS:
> 		@namespace empty "";
> 		=> valid

I don't see why you think this is an issue, because a) it's an edge case,  
b) it already works like this in at least two browsers, and c) there's a  
fair chance that XML 1.0 wil change.


> just to be sure:
>
> given XML:
>
> <doc xmlns="http://example.com#n1"
>       xmlns:n2="http://example.com#n2">
> 	<example/>
> 	<example xmlns="http://example.com#n3"/>
> 	<n2:example xmlns="http://example.com#n1"/>
> </doc>
>
> CSS selector with no default or any other namespace defined:
>
> 	example
>
> would not select anything in the above XML, or does it?
> (I wrote another post with a more complete example yesterday in a new  
> thread)

Why don't you test it yourself? example would select _all_ example  
elements. Regardless of namespace. (This changes if you put something like  
@namespace "test"; on top, of course.)


> SVG/XHTML do work, but if you need to style a document using both you  
> should understand namespaces and then they are relevant on the web too I  
> guess.

I don't see why you'd need to use @namespace in CSS to style a simple  
XHTML+SVG document.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Wednesday, 20 February 2008 10:27:39 GMT

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