W3C home > Mailing lists > Public > public-appformats@w3.org > September 2006

[XBL] Examples

From: Simon Pieters <zcorpan@hotmail.com>
Date: Thu, 14 Sep 2006 01:05:26 +0000
Message-ID: <BAY109-F293D1A9F6BEF93DF5C30F2B4290@phx.gbl>
To: public-appformats@w3.org


Below are comments regarding the examples in the XBL spec.

1. Introduction

I'd suggest using ".xml" as file extension here instead of ".xbl". Using 
".xbl" in examples might lead to mislabeled XBL on the Web.

   /* Reorder content */
   body { -xbl-binding: url(example.xbl#nav-then-main); }

1.1. Terminology and Conventions

"<[CDATA[" should be "<![CDATA[":

   <html xmlns="http://www.w3.org/1999/xhtml">
     <xbl xmlns="http://www.w3.org/ns/xbl">

2.2. The binding element

The ID "checkbox" is used twice:

    <binding element="ui|checkbox" id="checkbox"
      <div id="wrapper">
       <div id="checkbox"/>

2.5. The content element

"</ui>" should be "</data>":

   <data xmlns="http://example.com/data-language">

2.9. The div Element

The second "</handler>" should be "</handlers>":

   <xbl xmlns="http://www.w3.org/ns/xbl">
    <binding id="switch">
      <handler event="click">
         this.shadowTree.getElementById('main').getAttribute('state') == 
'on' ?
         'off' : 'on');

2.14. The prefetch element

Example uses "html" namespace prefix without a namespace declaration for the 
prefix. Also missing alt="":

   <xbl xmlns="http://www.w3.org/ns/xbl">
    <binding id="light">
      <html:img id="l" src="red.png"/>

3.3. Loading Style Sheets

The <content/> element is in the XHTML namespace, should probably be in the 
XBL namespace:

   <xbl xmlns="http://www.w3.org/ns/xbl">
      <div xmlns="http://www.w3.org/1999/xhtml">

4.2.1. Importing Binding Documents

In the examples, all occurances of "<binding>" should be "</binding>".

4.3. Attachment using CSS

The property should be "-xbl-binding" instead of "binding":

   input[type="checkbox"] {
     binding: url("http://www.example.org/xbl/htmlBindings.xml#checkbox");

5.7.1. Selectors and Shadow Scopes

All occurances of "</p>" should be "</html:p>":

    <content includes="p"><html:p>...</p></content>

"<xbl:content>" should be "<xbl:content/>":


5.9.1. General Rules

In the examples, usemap="test" should be usemap="#test".

Simon Pieters
Received on Thursday, 14 September 2006 01:05:35 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:50:05 UTC