Re: [XBL] Non-XBL elements

On Thu, 7 Dec 2006, Cyril Concolato wrote:
> 
> In Section 2 "XBL Elements", the specification says:
>
> "However, non-XBL elements retain their semantics, even when considered 
> to be in error for the purposes of XBL."
> 
> I'm trying to understand the usefulness of this sentence.
> First I tried to understand where non XBL elements are allowed.
> What is the purpose of allowing non-XBL element in the "xbl" and 
> "binding" elements ?

One example would be placing SVG gradient definitions there, for referring 
to them from <template>s.


> Then, I wondered what in error would mean for these non-XBL elements.  
> [...] When is an non XBL element in error ?

For example, the following non-XBL element is in error:

   <xbl xmlns="http://www.w3.org/ns/xbl">
    <binding>
     <resources>
      <prefetch>
       <my:element xmlns:my=""/>
      </prefetch>
     </resources>
    </binding>
   </xbl>

No element is allowed there, and it is therefore in error.


> Consider the following example:
> <xbl>
> <xhtml:div>...</xhtml:div>
> <template>
> <xhtml:p>...</xhtml:p>
> </template>
> </xbl>
> 
> Assuming, the xhtml:div element is in error. Then, the question is what 
> does it mean that it retains its semantics ?

It means it is still a structure block, just as the HTML spec defines it 
to be. A better example would be:

   <xbl xmlns="http://www.w3.org/ns/xbl">
    <binding>
     <resources>
      <html:script xmlns:html="http://www.w3.org/1999/xhtml">
       alert('test');
      </html:script>
     </resources>
    </binding>
   </xbl>

...the alert still shows, despite the <html:script> being in error for the 
purposes of XBL processing.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 9 January 2007 02:26:07 UTC