Re: Reminder: no Backplane call tomorrow -- pls send SMIL'y thoughts :}

Hi Ulrich,

> it is quite common to use <xf:load resource="javascript:my-function();"/> to
> trigger JavaScript functions from XForms. I don't know if ubiquity-xforms
> supports this, but it should be a no-brainer to add it.

I'm afraid we won't be adding that, if I have anything to do with it. :)

We never use this technique in our own code. In fact, when consulting
on form design, we've seen more problems with that technique amongst
our customers' forms than just about anything else. The 'technique' --
or 'hack' as it should be called, in its full, perjorative sense :) --
completely bypasses the whole XForms infrastructure, in terms of value
evaluation, rebuild, refresh, event handling, and so on. All that
happens is a function is executed out of context.

And what's more, it's completely unnecessary.

There are two natural extension points in XForms, where authors can
use their own functions; event handlers and XPath extension functions;
all we need to do is to ensure that both of those extension points are
easy to use.

That's not to say that we might not add the ability to have action
handlers too, probably based on the XHTML 2 Handler spec; it's just
that calling a function from within XPath or an event handler covers
most scenarios.

Regards,

Mark

-- 
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)

Received on Tuesday, 5 May 2009 09:10:27 UTC