W3C home > Mailing lists > Public > www-svg@w3.org > September 2004

Re: Comments about sXBL

From: Peter Sorotokin <psorotok@adobe.com>
Date: Wed, 22 Sep 2004 09:08:44 -0700
To: Cyril Concolato <cyril.concolato@enst.fr>, www-svg@w3.org
Message-id: <5.2.0.9.2.20040922090140.0366f548@mailsj-v1.corp.adobe.com>

At 02:39 PM 9/21/2004 +0200, Cyril Concolato wrote:

>Dear Scalable Vector Graphics Working Group,
>
>I have a question regarding the way XML events are dealt with in (s)XBL.
>I understand that an author will want to attach a handler to a definition 
>but what I don't understand is the way you specify it. The example in 
>section 5.1 shows:
>
>"
><xbl:definition element="myNS:button">
>    <xbl:template>...</xbl:template>
>    <xbl:handlerGroup>
>       <svg:handler ev:event="DOMActivate"...>...</svg:handler>
>    </xbl:handlerGroup>
></xbl:definition>
>...
><myNS:button id="b1">...</myNs:button>
><myNS:button id="b2">...</myNs:button>
><myNS:button id="b3">...</myNs:button>
>"
>
>Why did you define this new 'handlerGroup' element? Why couldn't one put 
>the handler within the definition as follows ?
>"
><xbl:definition element="myNS:button">
>    <xbl:template>
>       <svg:handler ev:event="DOMActivate"...>...</svg:handler>

This will handle events on xbl:template element, not on the bound element 
because XML Events works purely on CoreDOM level (granted, that could 
potentially be fixed by inventing a new attribute for svg:handler, but we'd 
have to invent it). In addition, this would incur an overhead of a listener 
object per element (vs. a listener object per element definition) and it 
would force you to always have a template (some useful bindings are purely 
event-based with no presentational part).

Peter

>       ...
>    </xbl:template>
></xbl:definition>
>...
><myNS:button id="b1">...</myNs:button>
><myNS:button id="b2">...</myNs:button>
><myNS:button id="b3">...</myNs:button>
>"
>
>In general, I don't think there is a need for a specific handling of 
>listeners. They should be part of the template and considered as opaque 
>XML content from the XBL point of view.
>
>Best regards,
>
>--
>Cyril Concolato
>Dept. Comelec
>Ecole Nationale Supérieure des Télécommunications, Paris
>46, rue Barrault 75013 Paris
>Tel: +33145817991    Fax: +33145804036
Received on Wednesday, 22 September 2004 16:11:14 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:55 UTC