XBL not bound via CSS

Benjamin D. Smedberg bsmedberg at covad.net
Thu, 19 Aug 2004 18:21:20 -0400

Brendan Eich wrote:
> Per http://bugzilla.mozilla.org/show_bug.cgi?id=244125#c17 and many 
> other bugs, binding XBL via CSS is Just Wrong (tm), and the cause of 
> many bugs and glitches for developers.  Hyatt agreed that this should be 
> fixed when I saw him the other week.  Question is, how?  Is there 
> anything going on in the w3c member-binding-tf to help here?  What do 
> *we* think the XUL or HTML syntax should be?

There is a syntax in the XBL2 draft spec, I haven't looked at sXBL 
recently. It essentially does <definition element="xul:foo">. This is a 
*great* way to attach arbitrary XBL to arbitrary XML, imagine:

<?xml-stylesheet href="foo.xbl" type="application/xbl+xml"?>

This same method might work for internal purposes to define the XUL 

We also need a method to automatically attach per-XML-dialect "style" to 
a document. E.g. at the moment, every XUL file (local and remote XUL) 
has to explicitly import chrome://global/skin/.  This is a silly 
implementation detail of XUL that we should be hiding: instead, when the 
XML parser first encounters an element in the XUL namespace, it should 
automatically import the appropriate XUL stylesheet(s). This would allow 
mixing HTML/XUL/MATHML/SVG/etc in a document, and only importing style 
as needed. This can be easily handled as an XPCOM category, so that 
add-on languages (some of which can be implemented strictly in XBL+CSS) 
can be plugged in as extensions.