xforms-link-exception and scripts

All,

We still have an `xforms-link-exception` event which is fatal. It is
used in the following places:

1. instance/@src and instance/@resource
2. loading of external schemas
3. the new action/@src [1]

I find that #3 particularly is annoying: if the script is meant to be
loaded during action processing, an xforms-action-error should occur
instead, or some other event which does not cause the entire
processing to stop.

Now I am not entirely sure that action/@src (previously
xf:script/@src) is really needed in the first place. It's a unclear
when the content of the script is loaded: is it every time the action
runs? That would be wasteful, as presumably @src would be used for
larger scripts. In browsers, external script content runs just once.
So if script content runs only once, would it be the first time the
action runs, or upon XForms initialization, or something else?

If script content is large, you can load it, in HTML, with a regular
<script> element. If that script exposes functions, a small inline
script can call them.

Inline scripts are easier because we can model each inline script
content as a function: load it once, and run it every time the action
runs, passing parameters as needed.

So if it turns out we don't need action/@src because we can't define a
clear processing model for it, the question of xforms-link-exception
for this action would go away.

Thoughts?

-Erik

[1] https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The_action_Element

Received on Wednesday, 17 February 2016 06:13:04 UTC