W3C home > Mailing lists > Public > public-xformsusers@w3.org > March 2014

Re: Access to arguments

From: Alain Couthures <alain.couthures@agencexml.com>
Date: Sun, 23 Mar 2014 21:18:40 +0100
Message-ID: <532F41A0.4060701@agencexml.com>
To: Steven Pemberton <Steven.Pemberton@cwi.nl>, Forms WG <public-forms@w3.org>, "public-xformsusers@w3.org" <public-xformsusers@w3.org>
URL arguments should not be considered as an instance: no model? 

A function such as "argument('name')" is effectively easy to implement 
with Javascript in XSLTForms.

It requires authors to know argument names in advance and doesn't allow 
them to get the list of names of effectively present arguments. Maybe 
"arguments()/name" or "location()/arguments/name" could also be considered.

Actually, any browser property accessible in "navigator" or "window" 
objects can be useful...

What do you think?

Alain Couthures

Le 19/03/2014 16:12, Steven Pemberton a écrit :
> I have a need to access the arguments given to a the URL that causes 
> an XForm to load.
>     http://www.example.com/form.xml?type=1&name=foo
> One option would be a pseudo-instance:
>     <setvalue ref="bar" value="instance('arguments')/name)" />
> but I imagine it would be easier to implement a function:
>     <setvalue ref="bar" value="argument('name')" />
> Any opinions?
> Steven Pemberton
Received on Sunday, 23 March 2014 20:19:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:43 UTC