Re: [ACTION-81] XML Events 2 draft updated

Greetings, I believe that what Mark suggests is what we agreed to do. We 
decided to leave the script element asis with the addition of an 
@implements attribute and this was made a candidate for XHTML 1.2.

The "script module" [1] in XML Events 2 would have an element identical to 
the one described except that it would be named handler.

For sanity sake we should make the attributes on the new "handler " 
element consistent with those on the "script" element we have slated for 
XHTML 1.2 but since this is only an update to the WD we can reconcile 
before Last Call draft which I hope will be soon.

[1] http://www.w3.org/MarkUp/2009/WD-xml-events-20090508/#s_script_module

Regards, Roland
FBCS, CITP
IBM Software Group, Strategy, Software Standards
Tel/Fax: +44 (0)1926-465440
Mobile: +44 (0)77 2520-0620



From:
Mark Birbeck <mark.birbeck@webbackplane.com>
To:
Shane McCarron <shane@aptest.com>
Cc:
XHTML WG <public-xhtml2@w3.org>
Date:
06/05/2009 16:52
Subject:
Re: [ACTION-81] XML Events 2 draft updated



Hi Shane,

Using <script> in the way outlined in the examples (first and third
examples, section 3.3.1):

  <script type="application/x-javascript" ev:event="submit" 
ev:observer="form1">
    return docheck(event);
  </script>

  <img src="button.gif" alt="OK">
    <script ev:event="DOMActivate" type="application/x-javascript">
      doactivate(event);
    </script>
  </img>

will cause an error in current browsers, since the body of the script
tag will be executed on document load, regardless of the presence of
the @ev:* attributes.

I realise we could argue that XML Events 2 is not supposed to work in
current browsers, but I would also argue that:

 (a) it easily could, in just the same way that we're making XForms work 
in
      current browsers, by way of Ubiquity XForms;

 (b) support for standards in browsers is piecemeal, and uptake is patchy, 
so
     it's advisable to create standards that can not only be built
into browsers,
     but can also be implemented using script.

I believe that a simple resolution here is to leave <script> alone to
do what it currently does in HTML, and instead to introduce a
<handler> element. Since this element is not understood by current
browsers, the content will not be interpreted as script, and
therefore, will not be executed when the document loads.

Regards,

Mark

On Wed, May 6, 2009 at 3:52 PM, Shane McCarron <shane@aptest.com> wrote:
> As per my action item, I have prepared a working draft of XML Events 2 
for
> publication.  It is at 
http://www.w3.org/MarkUp/2009/WD-xml-events-20090508/
>
> Roland, if you give it a quick look and it seems fine, please send a
> publication request to webreq@w3.org authorizing its publication, cc me, 
and
> tell the pub group to work with me if there are any issues that need to 
get
> sorted prior to publication.
>
> Thanks!
>
> --
> Shane P. McCarron                          Phone: +1 763 786-8160 x120
> Managing Director                            Fax: +1 763 786-8180
> ApTest Minnesota                            Inet: shane@aptest.com
>
>
>
>



-- 
Mark Birbeck, webBackplane

mark.birbeck@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)









Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Received on Thursday, 7 May 2009 11:01:49 UTC