See Erik's comments below on Google+.
The API must expose useful aspects of the XForms runtime, including:
- access to XForms actions such as setfocus, setindex, toggle, send, dispatch, etc.
- access to XForms functions such as index(), etc.
- access XForms control properties such as a control's value, etc.
- read/write/mutate XForms instances, possibly through a DOM API and/or insert/delete/setvalue
The API implementation ensures the XForms processing model, including deferred updates.
The current rebuild, recalculate, revalidate, refresh are available, but a simple update() method that either runs all four, or runs the ones indicated by deferred update flags, would be more user-friendly.
NOTE: Some consideration would have to be given as to how to do IDREF resolution. The spec resolves IDREFS based on location of invocation relative to the referent. Is that still possible from script?
Added Erik Bruchez 22:27, 29 August 2011 (UTC)
- Experiment to describe actions with JS, CoffeeScript, XQuery, and Scala: https://gist.github.com/790257