RE: [css3] "Selectors that People Actually Use"

Geoffrey Sneddon wrote:

> On 18 Feb 2008, at 17:44, Alan Gresley wrote:
> 
> > * E:root - Very un-useful in HTML. You already know what the root  
> > node is - it's named 'html'.
> >
> > Does every document have HTML as the root element? Look at the  
> > source of this page.
> >
> > http://annevankesteren.nl/test/css/at-rule/import-001.htm
> 
> Yes, it has a HTML root element. It's implied by the context. See HTML  
> 4.01 and/or HTML 5. Sure, it may not explicitly be in the document,  
> but look in any DOM tree of that document, and you'll see it there.
> 
> 
> --
> Geoffrey Sneddon
> <http://gsnedders.com/>


Yes someone offlist has pointed that out my error here with Anne's test case but indeed I see a use case. Across a large site, multi domain or intranet you can have several namespaces.

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

<html xmlns="http://other-domain.org/xhtml" xml:lang="en" lang="en">

<html xmlns="http://other-domain-two.org/xhtml" xml:lang="en" lang="en">

Then I could go.

body {}
body[xmlns="http://other-domain.org/xhtml"] {}
body[xmlns="http://other-domain-two.org/xhtml"] {}
body[xmlns|="domain"] {}

and another author somewhere else could overrule my last selector with this one.

:root[xmlns|="domain"] {}


Alan

http://css-class.com/

Received on Monday, 18 February 2008 20:12:17 UTC