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

Re: Access to arguments

From: Nick Van den Bleeken <Nick.Van.den.Bleeken@inventivegroup.com>
Date: Thu, 20 Mar 2014 10:52:36 +0000
To: Erik Bruchez <erik@bruchez.org>
CC: Steven Pemberton <Steven.Pemberton@cwi.nl>, Public Forms <public-forms@w3.org>, "public-xformsusers@w3.org" <public-xformsusers@w3.org>
Message-ID: <D155DDC9-CD74-447E-BC2B-07CDA9548647@inventivegroup.com>
We use that extension function constantly, to pass defaults and/or idís to fetch the instance data using submissions. So we are in favour of standardising this (but it is probably a bit late for XForms 2.0)

Kind regards,

Nick Van den Bleeken
R&D Manager

Phone: +32 3 425 41 02
Office fax: +32 3 821 01 71


On 19 Mar 2014, at 17:37, Erik Bruchez <erik@bruchez.org<mailto:erik@bruchez.org>> wrote:

Oh and yes I prefer a function to an instance.


On Wed, Mar 19, 2014 at 9:35 AM, Erik Bruchez <erik@bruchez.org<mailto:erik@bruchez.org>> wrote:
We have extensions functions for that:


For your use case we have:


That sounds a bit server-side as an API name though.

BTW browsers have Window.location and Document.location which return
Location objects, but there doesn't seem to be anything to parse the
query string:



On Wed, Mar 19, 2014 at 8:12 AM, Steven Pemberton
<Steven.Pemberton@cwi.nl> wrote:
I have a need to access the arguments given to a the URL that causes an
XForm to load.


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


Inventive Designers' Email Disclaimer:

(image/png attachment: image001.png)

(image/png attachment: image002.png)

(image/png attachment: image003.png)

Received on Thursday, 20 March 2014 10:53:08 UTC

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