Re: [css3-selectors] Namespace name lookup mechanisms

Bjoern Hoehrmann wrote:
> 
> What we have now is a specification claiming that "given an element and a
> selector, this specification defines whether that element matches the
> selector" which is true only if you don't have namespace in the mix.
> My proposal defines, given an element, a selector, and one of
> 
>   * a hash with case-sensitive keys
>   * a hash with case-insensitive keys
>   * an algorithm to resolve prefixes
> 
> whether the element matches the selector. Specifications using the
> Selectors specification then simply have to define the hash or the
> algorithm to be used. I think that this is also in scope of the
> specification. Keeping the specification as is would leave us with
> 
>   [ mechanism for declaring a namespace prefix ]
>                         |
>                       magic
>                         |
>                         v
>                [ selector x element -> boolean ]
> 
> Do you have some other proposal for how to remove this magic bit?
> 
> (I note that some of these problems also apply to default namespace
> declarations; the current draft does not even say that the mechanism
> for declaring a default namespace is to be defined by other specs.)

One way to handle this would be to add the necessary recommendations to
the Qualified Names chapter of CSS Namespaces and then have Selectors
reference that. This way we fix all these issues only once, instead of
once for Selectors, another time for Values and Units, etc.

~fantasai

Received on Friday, 20 October 2006 04:37:13 UTC