[XBL] Namespace prefixes in Selectors

Hi,

I was thinking about namespace prefixes in Selectors in XBL.

In XBL namespace prefixes in Selectors are declared with the xmlns:foo="" 
notation[1]:

>In XBL attributes that take selectors, the namespace prefixes that may be 
>used
>are the prefixes that are in scope using the xmlns:* syntax.

I feel uncomfortable about this. The XML namespace prefix is just syntactic 
sugar to bind a namespace name to an element or an attribute. The 
application might not even know about the prefixes, if it is using another 
model than the DOM. Also, XML documents might be namespace prefix rewritten, 
which shouldn't change the semantics of the document.

If we instead had the namespace declarations for Selectors in some attribute 
value or in content, then they would survive namespace prefix rewritings, 
and apps that don't know about XML prefixes are able to implement XBL.

On the other hand, I realize that it might be more convenient for authors to 
just use the xmlns:* syntax, and perhaps apps already know about prefixes, 
and namespace rewriting perhaps isn't an issue, but I think this deserves 
some discussion.


Now, if we ignore the above for a bit and look at how it's currently 
defined, I have a separate question: does the implied "xml" namespace prefix 
apply to Selectors? As in:

   <xbl xmlns="http://www.w3.org/ns/xbl">
    <binding element="*[xml|base]">...

...or does it have to be declared explicitly? How does *[xmlns|foo] work? 
(The "xmlns" prefix has a namespace, but it can't be declared explicitly.)

Namespace prefixes in Selectors in CSS are case insensitive. All attribute 
values are case-sensitive in XBL. Perhaps it would be good to add a note in 
[1] that explains why this is different between CSS and XBL.

[1] http://www.w3.org/TR/xbl/#attributes

Regards,
Simon Pieters

Received on Tuesday, 12 September 2006 17:14:15 UTC