W3C is pleased to receive the XBL submission ("XML Binding Language 1.0") from America Online, Inc.
XBL combines an XML-based wrapper format with CSS, ECMAScript and the DOM, to define the look and behavior of elements in HTML or XML-based documents (especially form elements). Apart from the XML-based wrapper format, it proposes an extension to CSS and new functions for the DOM.
The submission is a further development of two earlier submissions ("Action sheets" by Netscape and "HTML components" by Microsoft) and a CSS working draft ("Behavioral extensions").
The existence of the working draft indicates that the CSS working group (member-only link) has already been thinking about the topic and this new submission will be brought to their attention. The submitters themselves also request that the CSS WG completes the specification.
It would also be good if the XForms WG (member-only link) could have a look at the submission, to see if the XBL approach can, in principle, satisfy the rendering and interaction needs of the high-level form controls they are defining.
Since the submission proposes new APIs for the DOM, the submission will also be sent to the DOM WG (member-only link).
Disclaimer: placing a Submission on a Working Group/Interest Group agenda does not imply endorsement by either the W3C Staff or the participants of the Working Group/Interest Group, nor does it guarantee that the Working Group/Interest Group will agree to take any specific action on a Submission.
Although the approach is clearly powerful, it is also complex, and it does not remove the need for procedural code (cf. Tim Berners-Lee's essay "principle of least power"). The complexity comes from the variety of formats involved and the levels of indirection: a source document is associated with a (CSS) style sheet, which in turn associates an XBL file with elements in the document, which in turn contains further XML documents, more CSS and also ECMAScript.
It seems that, at least in theory, XBL can even be recursive: an XBL file can contain a CSS style sheet that links further XBL files to the elements created by the first XBL file, and so on.
XBL is therefore not like an embedded image or object, which can be treated as a "black box" that is handled by a plug-in or an independent program. The scripts provided in the XBL file have access to the DOM of the document the XBL is attached to. Furthermore, although the scripts in the original document cannot "see" the document fragments inserted by XBL, any CSS style sheets in the original document do apply to those fragments.
An alternative approach might be to use XSLT to transform a source document to one that includes the fragments, although the disadvantage will be that the DOM contains the expanded document and no longer only the original. Also, this approach does not really reduce the number of different technologies involved.
Yet another approach is to extend CSS with extra properties to capture the most typical looks and behaviors (extra borders, drop down menus, icons, etc.) of user interface controls, but the disadvantage is, that the flexibility of XBL to experiment with new looks and new behaviors will not be there.
The approach proposed by Spice, a 1998 submission from
Hewlett-Packard, might provide a more elegant solution. Although it also
relies on procedural code, it expresses the structure, the look and the
behavior of interactive elements all in a single, easy to use language (an
object-oriented variant of ECMAScript, in fact, which should be especially
easy to understand for people who already know CSS). It also does not rely on
CSS or extensions to CSS, since it could be included via the
link elements of HTML or the
xml-stylesheet PI of XML directly. ECMA is currently considering
integrating parts of Spice into ECMAScript revision 4.