- From: Chris Lilley <chris@w3.org>
- Date: Mon, 18 Aug 2003 15:52:17 +0200
- To: "L. David Baron" <dbaron@dbaron.org>
- Cc: www-tag@w3.org
On Sunday, August 17, 2003, 7:48:38 PM, L. David Baron wrote: LDB> On Sunday 2003-08-17 16:56 +0200, Chris Lilley wrote: >> CSS3 also picks the element rules (for both elements and, it seems, >> for attributes) >> http://www.w3.org/TR/2003/WD-css3-syntax-20030813/#defining LDB> No, the default namespace applies only to elements without an LDB> explicit namespace in CSS3, and attributes without an explicit LDB> namespace have no namespace. Ah, excellent. That is as I would expect. Its not clear from the text in the specification, however (since I misunderstood it, as one datapoint). >> "If the optional namespace prefix is omitted, then the namespace >> URI is considered to be the default namespace. The default >> namespace applies only to type selectors that have no explicit >> namespace prefix declared as described in the Selectors Module >> [SELECT]. " LDB> The first sentence here describes how the default namespace is LDB> defined, not how it is used. The second sentence applies the LDB> element rules only to elements ("type selectors" could perhaps be LDB> called "element type selectors"). For attribute selectors (see LDB> [1]) and attr() values (see a future draft of the values and LDB> units module), no prefix means no namespace. Thanks for the clear explanation. I suggest that a similar explanation be added to the specification itself. LDB> The syntax draft would probably be clearer if the the second sentence LDB> you quote stated the element vs. attribute rule in general (to apply to LDB> any CSS modules that use namespaces) rather than referring to the one LDB> CSS module that currently uses namespaces with element names. Yes, I agree that it would. Now, having satisfactorily dealt with element selectors and attribute name selectors, there is the third case to consider - selecting on attribute values. If I have <foo xmlns:n="http:example.org/n" bar="n:toto"/> how do I write the corresponding selector - would it be @namespace a url(http:example.org/n); [bar="a|toto"] { color: blue } and will that selector also match any of <foo xmlns:n="http:example.com/m" bar="n:toto"/> <foo xmlns:x="http:example.org/n" bar="x:toto"/> <foo bar="n:toto"/> <foo bar="toto"/> without any domain specific knowledge? Hoping the answers are no,yes,no,no for those four examples. -- Chris mailto:chris@w3.org
Received on Monday, 18 August 2003 09:52:22 UTC