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

Re: Access to arguments

From: Joern Turner <joern.turner@betterform.de>
Date: Mon, 24 Mar 2014 09:20:47 +0100
Message-ID: <532FEADF.1000903@betterform.de>
To: public-xformsusers@w3.org
Hello Steven,

for betterFORM we use the following approach:

- a function as proposed in this thread already. Example:
bf:appContext('param1'). Of course the function name is not a very lucky
choice.

- allowing to access url params in AVT syntax in certain contexts (like
submission @resource. Example <submission resource="myURL?param={$param1}"

just my 2 cents.

Joern


Am 19.03.14 16:12, schrieb Steven Pemberton:
> 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 Monday, 24 March 2014 08:21:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:48:26 UTC