1
edit
Changes
XBL
,→How Does XBL Work?
=What is XBL?=
XBL stands for eXtensible Bindings Language, which is an XML language that is used for declaring the behaviours of XUL widgets. Bindings can be attached to elements using either cascading stylesheets or the document object model. The element that the binding is attached to, called the bound element, acquires the new behavior specified by the binding.
=What Does XBL stands for eXtensible Bindings LanguageDo?=Basically, which XBL is an XML language a langauge that is used for declaring the behavious describes a set of XUL widgets. Bindings bindings that can be attached and bound to elements using either cascading stylesheets or on the document object modelscreen. The element that When bound, the binding is attached implements new methods and properties to, called the bound associated element. In essence, acquires the new behavior widgets on the screen are layed out using XUL and then given functionality using XBL. =How Does XBL Work?=::The XBL file used in developing XUL based applications is used to provide a specified by the bindingset of functionality to individual elements that are rendered onto your screen.
=How does What's in a XBL workfile?===*An XBL Elements==file is just an ordinary XML file.:'''Bindings'''::The '''Bindings''' element contains *An XBL file can contain many Binding binding elements.'''DTD decleration'''
<pre>
<!ELEMENT bindings ( binding* ) ?xml version="1.0"?> [ where * indicates zero or more of the binding element] <bindings id="xulBindings" xmlns="http://www.mozilla.org/pre>xbl"'''XML representation''' xmlns:html="http://www.w3.org/1999/xhtml"<pre><bindings xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <binding id="binding1thumb" extends="xul:box"> <content> <xul:spring flex="1"/> <xul:image inherits="src"/> <xul:spring flex="1"/> </content>
</binding>
</pre>
This syntax example is borrowed from :[http://www.mozilla.org/docs/xul/xulnotes/xulnote_xbl.html#syntax http://www.mozilla.org/docs/xul/xulnotes/xulnote_xbl.html#syntax].
=Resources/Examples=
==Test Cases==
===Example 1===
[http://developer.mozilla.org/en/docs/CSS:Getting_Started:XBL_bindings XBL bindings Example]
===Example 2===
In this example, we can use XUL to define the layout of user interface and then use XBL to change the widgets functionality. <br/><br/>
<box class="okcancelbuttons"/>
</window>
</pre>
<pre>
button[type="okcancelbuttons"] {
-moz-binding: url("http://www.mozilla.org/xbl/htmlBindings.xml#okcancel");
}
</pre>
</bindings>
</pre>
==API Reference/Tutorials==
The [http://www.mozilla.org/projects/xbl/xbl.html Mozilla Webpage] has a list of Tags and examples that document the usage of XBL.
[http://www.mozilla.org/docs/xul/xulnotes/xulnote_xbl.html An XBL Primer]
==Newsgroup==
[http://groups.google.ca/group/netscape.public.mozilla.xbl netscape.public.mozilla.xbl]