The GET method with a query string allows to activate methods of such
APIs. For cross domain workaround, an extra parameter, usually named
adding a script element with the corresponding src attribute will call
the callback function with the JSON structure.
Just to see how it might work, I added a test in XSLTForms whether the
submission is a cross domain one or not. If it is, as a default mode, it
considers it's a JSON API call and automatically adds the callback
parameter with the name of the function which will be able to convert a
JSON structure into an XML instance. Serialization is set to "none" in
Just look at the source to see the XForms document.
The JSON to XML translation was not very easy to write because JSON
arrays might appear without any name and I decided to create elements
named "array" and "item" as a workaround. I also had to add a root
element, named "root" of course ;-)
I think that the input element with suggestions taken from a
controlled dictionary (or onthology), as the demo you have posted,
should be a new input element type for xForms. It can be very useful
in forms for the description of user generated contents, like tags on
What do you think? Can we suggest it for the next xForms version?
I have also noticed that xForms lacks of a round() function, to round
decimal numers to n decimal places.
About functions: XPath 2.0 has a round() function. The working group
is working on integrating XPath 2.0 into XForms so that XForms can
benefit not only from the improved capabilities of XPath 2.0 as an
expression language but also from its much better function library.
On Sat, Feb 6, 2010 at 1:16 AM, Lorenzo De Tomasi
<[hidden email]> wrote:
> I think that the input element with suggestions taken from a
> controlled dictionary (or onthology), as the demo you have posted,
> should be a new input element type for xForms. It can be very useful
> in forms for the description of user generated contents, like tags on
> What do you think? Can we suggest it for the next xForms version?
> I have also noticed that xForms lacks of a round() function, to round
> decimal numers to n decimal places.
> On Fri, Feb 5, 2010 at 5:32 PM, COUTHURES Alain
> <[hidden email]> wrote:
>> Here is a link to a demo:
>> http://www.agencexml.com/jsoncallback/wikipediasearch.xml >
> Salta la crisi! Investi in comunicazione <http://isotype.org/?lang=it>
> Lorenzo De Tomasi
> ISOTYPE.org | comunica la qualità
> Designer della comunicazione
> Rispetta il tuo ambiente, pensa prima di stampare questa e-mail. Grazie.
> Please consider the environment before printing this email. Thank you.