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

Re: Access to arguments

From: Steven Pemberton <Steven.Pemberton@cwi.nl>
Date: Wed, 26 Mar 2014 16:08:18 +0100
To: public-forms@w3.org
Message-ID: <op.xdb4b4mnsmjzpq@steven-ux21a>
On Wed, 26 Mar 2014 15:08:49 +0100, Steven Pemberton  
<Steven.Pemberton@cwi.nl> wrote:

> On Sun, 23 Mar 2014 21:18:40 +0100, Alain Couthures
> <alain.couthures@agencexml.com> wrote:
>
>> URL arguments should not be considered as an instance: no model?  
>> read-only?...
>
> I meant an instance initialised with the values of the arguments.

Which could be easily enough simulated with an action on xforms-ready, it  
is true.

Steven

>
>> 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.
>
> Personally I'm not too worried about that.
>
>> Actually, any browser property accessible in "navigator" or "window"  
>> objects can be useful...
>>
>> What do you think?
>
> I think we should spec it! :-)
>
> Steven
>
>> 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 Wednesday, 26 March 2014 15:08:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:14:09 UTC