Anne van Kesteren

sXBL versus XBL2

This post contains a comparison table comparing sXBL and XBL2. Nothing is normative, but it might just be correct. XBL stands for XML Binding Language and allows you to do cool stuff. See the examples in both specifications. It should be noted that the W3C has plans to work on an XBL2 as well. Dunno how that will work out.

The prefix sxbl in the table below is bound to the namespace and the prefix xbl2 is bound to the namespace.

-Error handlingVaguely defined in sXBL.
sxbl:prebind, sxbl:bound and sxbl:unbinding eventsThe events were replaced by methods that can be implemented by the author.-
sxbl:import elementxbl processing instructionThey have different processing models, e.g. the PI is immutable and does not allow subtree references.
sxbl:definition elementxbl2:binding element (also has extends as attribute)-
<definition element=""> is a QName<binding element=""> is a Selector-
No scripting/security model?Scripting/security model-
-implicit and explicit inheritance (multiple bindings on one bound element)-
binding document stylesheetsscoped stylesheets-
-xbl2:implementation element-
sxbl:template elementxbl2:template element (also has apply-author-sheets and allow-selectors-through as attributes)-
sxbl:shadow-tree elementxbl2:template elementIn XBL2 the element name never changes.
-xbl2:inherited element-
SVG specificdefines how XBL works with HTML, SVG et cetera-
-xbl2:inherits attribute-
-xbl2:pseudo attributeI like this!
-xbl2:style element-
-xbl2:resources element-
-xbl2:script element-
-xbl2:prefetch elementFor things like new Image() is used today for. Support is optional though.
staticallows dynamic forcing of insertion pointsSee the xblSetInsertionPoint() method on XBLContentElement
-concept of trusted events-
sxbl:content elementxbl2:content element (also has apply-binding-sheets and locked as attributes)xbl2:content's processing model is probably going to be quite different from sxbl:content's (because of sXBL probably changing). In particular, nested bindings handle repositioned explicit children of higher scopes atomically in sXBL, and mixed in with other explicit children in XBL2.
sxbl:handlerGroup elementxbl2:handlers element-
ev:listener, svg:handler or other event handler elementsmore powerful xbl2:handler element while still allowing the other event handler elements like ev:listener and svg:handler-
Probably ends up using XPathUses SelectorsW3C Member only comparison of those technologies specifically written for this context.
id attributeid attributeHello, xml:id is a Rec!

Thanks to Ian Hickson for providing some additional points.