XBL not bound via CSS

David Hyatt hyatt at meer.net
Thu, 19 Aug 2004 15:48:07 -0700

Yeah, I agree.  You'd basically like to import common "user agent" CSS 
and XBL and have it already available.  Rather than having a binding 
registry, it might be possible to just have an implicit set of XBL2 
attachment instructions as well as CSS instructions.

I'm not sure though if XBL currently says that elements created but not 
inserted into the document have bindings attached at creation time or 
not.  You may have the exact same problem that CSS has right now (if 
you're not yet in the document, the attachment isn't supposed to occur 
yet) with the declarative XML PI way.


On Aug 19, 2004, at 3:21 PM, Benjamin D. Smedberg wrote:

> 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 
> language.
> 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.
> --BDS
> _______________________________________________
> Mozilla2.0 mailing list
> Mozilla2.0@mozilla.org
> http://mail.mozilla.org/listinfo/mozilla2.0